Merge pull request #2866 from Onutsio/selfservice #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: BYOND Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| BYOND_MAJOR: 515 | |
| BYOND_MINOR: 1636 | |
| SPACEMAN_DMM_VERSION: suite-1.9 | |
| jobs: | |
| run-linters: | |
| if: ( !contains(github.event.head_commit.message, '[ci skip]') ) | |
| name: Run Linters | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/SpacemanDMM | |
| key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spacemandmm- | |
| - name: Restore Rust cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: ${{ runner.os }}-rust-${{ hashFiles('tools/ci/ci_dependencies.sh')}} | |
| restore-keys: | | |
| ${{ runner.os }}-rust- | |
| - name: Install Tools | |
| run: | | |
| pip3 install setuptools | |
| bash tools/ci/install_spaceman_dmm.sh dreamchecker | |
| bash tools/ci/install_ripgrep.sh | |
| tools/bootstrap/python -c '' | |
| - name: Run Linters | |
| run: | | |
| bash tools/ci/check_filedirs.sh roguetown.dme | |
| bash tools/ci/check_changelogs.sh | |
| find . -name "*.php" -print0 | xargs -0 -n1 php -l | |
| # bash tools/ci/check_grep.sh # TODO: fix indentation etc | |
| # tools/bootstrap/python tools/ci/validate_dme.py < roguetown.dme # TODO: fix unincluded files | |
| tools/bootstrap/python -m dmi.test | |
| tools/bootstrap/python -m mapmerge2.dmm_test | |
| ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 | |
| - name: Annotate Lints | |
| uses: yogstation13/DreamAnnotate@v2 | |
| if: always() | |
| with: | |
| outputFile: output-annotations.txt | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Restore BYOND cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/BYOND | |
| key: ${{ runner.os }}-BYOND-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }} | |
| - name: Install BYOND | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y make gcc unzip | |
| bash tools/ci/install_byond.sh | |
| - name: Compile BYOND project | |
| run: | | |
| ls -h $HOME/ | |
| source $HOME/BYOND/byond/bin/byondsetup | |
| DreamMaker roguetown.dme | |
| - name: Check for errors | |
| id: check-errors | |
| run: | | |
| if grep -q "error" *.log; then | |
| echo "::error ::Compilation failed with errors." | |
| exit 1 | |
| else | |
| echo "Compilation succeeded without critical errors." | |
| fi |