Skip to content

Commit d95de4e

Browse files
authoredJun 17, 2024··
Merge branch 'main' into FFMQ-mrks-WebsiteTracker
2 parents 714a29c + 898509e commit d95de4e

File tree

267 files changed

+6154
-2973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+6154
-2973
lines changed
 

‎.github/workflows/build.yml

+54-7
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ jobs:
3636
run: |
3737
Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip
3838
Expand-Archive -Path enemizer.zip -DestinationPath EnemizerCLI -Force
39+
choco install innosetup --version=6.2.2 --allow-downgrade
3940
- name: Build
4041
run: |
4142
python -m pip install --upgrade pip
4243
python setup.py build_exe --yes
44+
if ( $? -eq $false ) {
45+
Write-Error "setup.py failed!"
46+
exit 1
47+
}
4348
$NAME="$(ls build | Select-String -Pattern 'exe')".Split('.',2)[1]
4449
$ZIP_NAME="Archipelago_$NAME.7z"
4550
echo "$NAME -> $ZIP_NAME"
@@ -49,12 +54,6 @@ jobs:
4954
Rename-Item "exe.$NAME" Archipelago
5055
7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago
5156
Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name
52-
- name: Store 7z
53-
uses: actions/upload-artifact@v4
54-
with:
55-
name: ${{ env.ZIP_NAME }}
56-
path: dist/${{ env.ZIP_NAME }}
57-
retention-days: 7 # keep for 7 days, should be enough
5857
- name: Build Setup
5958
run: |
6059
& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL
@@ -65,11 +64,38 @@ jobs:
6564
$contents = Get-ChildItem -Path setups/*.exe -Force -Recurse
6665
$SETUP_NAME=$contents[0].Name
6766
echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV
67+
- name: Check build loads expected worlds
68+
shell: bash
69+
run: |
70+
cd build/exe*
71+
mv Players/Templates/meta.yaml .
72+
ls -1 Players/Templates | sort > setup-player-templates.txt
73+
rm -R Players/Templates
74+
timeout 30 ./ArchipelagoLauncher "Generate Template Options" || true
75+
ls -1 Players/Templates | sort > generated-player-templates.txt
76+
cmp setup-player-templates.txt generated-player-templates.txt \
77+
|| diff setup-player-templates.txt generated-player-templates.txt
78+
mv meta.yaml Players/Templates/
79+
- name: Test Generate
80+
shell: bash
81+
run: |
82+
cd build/exe*
83+
cp Players/Templates/Clique.yaml Players/
84+
timeout 30 ./ArchipelagoGenerate
85+
- name: Store 7z
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: ${{ env.ZIP_NAME }}
89+
path: dist/${{ env.ZIP_NAME }}
90+
compression-level: 0 # .7z is incompressible by zip
91+
if-no-files-found: error
92+
retention-days: 7 # keep for 7 days, should be enough
6893
- name: Store Setup
6994
uses: actions/upload-artifact@v4
7095
with:
7196
name: ${{ env.SETUP_NAME }}
7297
path: setups/${{ env.SETUP_NAME }}
98+
if-no-files-found: error
7399
retention-days: 7 # keep for 7 days, should be enough
74100

75101
build-ubuntu2004:
@@ -110,23 +136,44 @@ jobs:
110136
echo -e "setup.py dist output:\n `ls dist`"
111137
cd dist && export APPIMAGE_NAME="`ls *.AppImage`" && cd ..
112138
export TAR_NAME="${APPIMAGE_NAME%.AppImage}.tar.gz"
113-
(cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -czvf ../dist/$TAR_NAME Archipelago && mv Archipelago "$DIR_NAME")
139+
(cd build && DIR_NAME="`ls | grep exe`" && mv "$DIR_NAME" Archipelago && tar -cv Archipelago | gzip -8 > ../dist/$TAR_NAME && mv Archipelago "$DIR_NAME")
114140
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
115141
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
116142
# - copy code above to release.yml -
117143
- name: Build Again
118144
run: |
119145
source venv/bin/activate
120146
python setup.py build_exe --yes
147+
- name: Check build loads expected worlds
148+
shell: bash
149+
run: |
150+
cd build/exe*
151+
mv Players/Templates/meta.yaml .
152+
ls -1 Players/Templates | sort > setup-player-templates.txt
153+
rm -R Players/Templates
154+
timeout 30 ./ArchipelagoLauncher "Generate Template Options" || true
155+
ls -1 Players/Templates | sort > generated-player-templates.txt
156+
cmp setup-player-templates.txt generated-player-templates.txt \
157+
|| diff setup-player-templates.txt generated-player-templates.txt
158+
mv meta.yaml Players/Templates/
159+
- name: Test Generate
160+
shell: bash
161+
run: |
162+
cd build/exe*
163+
cp Players/Templates/Clique.yaml Players/
164+
timeout 30 ./ArchipelagoGenerate
121165
- name: Store AppImage
122166
uses: actions/upload-artifact@v4
123167
with:
124168
name: ${{ env.APPIMAGE_NAME }}
125169
path: dist/${{ env.APPIMAGE_NAME }}
170+
if-no-files-found: error
126171
retention-days: 7
127172
- name: Store .tar.gz
128173
uses: actions/upload-artifact@v4
129174
with:
130175
name: ${{ env.TAR_NAME }}
131176
path: dist/${{ env.TAR_NAME }}
177+
compression-level: 0 # .gz is incompressible by zip
178+
if-no-files-found: error
132179
retention-days: 7

‎.github/workflows/ctest.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Run CMake / CTest C++ unit tests
2+
3+
name: ctest
4+
5+
on:
6+
push:
7+
paths:
8+
- '**.cc?'
9+
- '**.cpp'
10+
- '**.cxx'
11+
- '**.hh?'
12+
- '**.hpp'
13+
- '**.hxx'
14+
- '**.CMakeLists'
15+
- '.github/workflows/ctest.yml'
16+
pull_request:
17+
paths:
18+
- '**.cc?'
19+
- '**.cpp'
20+
- '**.cxx'
21+
- '**.hh?'
22+
- '**.hpp'
23+
- '**.hxx'
24+
- '**.CMakeLists'
25+
- '.github/workflows/ctest.yml'
26+
27+
jobs:
28+
ctest:
29+
runs-on: ${{ matrix.os }}
30+
name: Test C++ ${{ matrix.os }}
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
os: [ubuntu-latest, windows-latest]
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: ilammy/msvc-dev-cmd@v1
40+
if: startsWith(matrix.os,'windows')
41+
- uses: Bacondish2023/setup-googletest@v1
42+
with:
43+
build-type: 'Release'
44+
- name: Build tests
45+
run: |
46+
cd test/cpp
47+
mkdir build
48+
cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release
49+
cmake --build build/ --config Release
50+
ls
51+
- name: Run tests
52+
run: |
53+
cd test/cpp
54+
ctest --test-dir build/ -C Release --output-on-failure

0 commit comments

Comments
 (0)
Please sign in to comment.