diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index deea08a9751..5403353f796 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,11 @@ jobs: outputFile: output-annotations.txt unit_tests: - name: Integration Tests + strategy: + matrix: + map: ['tether', 'stellardelight', 'groundbase'] + name: Integration Tests (${{ matrix.map }}) + needs: ['file_tests', 'dreamchecker'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -78,6 +82,7 @@ jobs: env: TEST_DEFINE: "UNIT_TEST" TEST_FILE: "code/_unit_tests.dm" + MAP: ${{ matrix.map }} RUN: "1" - name: Compile POIs (no run) run: | @@ -86,6 +91,7 @@ jobs: env: TEST_DEFINE: "MAP_TEST" TEST_FILE: "code/_map_tests.dm" + MAP: ${{ matrix.map }} RUN: "0" - name: Compile away missions (no run) run: | @@ -94,4 +100,5 @@ jobs: env: TEST_DEFINE: "AWAY_MISSION_TEST" TEST_FILE: "code/_away_mission_tests.dm" + MAP: ${{ matrix.map }} RUN: "0" diff --git a/tools/ci/compile_and_run.sh b/tools/ci/compile_and_run.sh index 3745e41e39d..f6dd36d45ec 100644 --- a/tools/ci/compile_and_run.sh +++ b/tools/ci/compile_and_run.sh @@ -11,6 +11,15 @@ cp config/example/* config/ # Define any unit test defines that need to run echo "#define ${TEST_DEFINE} 1" > ${TEST_FILE} +# Messy map compile code +if grep -Fxq "#include \"maps\tether\tether.dm\"" $BASENAME.dme then + sed -i "/#include \"maps\tether\tether.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme +elif grep -Fxq "#include \"maps\stellardelight\stellardelight.dm\"" $BASENAME.dme then + sed -i "/#include \"maps\stellardelight\stellardelight.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme +elif grep -Fxq "#include \"maps\groundbase\groundbase.dm\"" $BASENAME.dme then + sed -i "/#include \"maps\groundbase\groundbase.dm\"/c\\#include \"maps\\${MAP}\\${MAP}.dm\"" $BASENAME.dme +fi + # Compile a copy of the codebase, and print errors as Github Actions annotations DreamMaker $BASENAME.dme > compile.log exitVal=$?