Release #4
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-linux-x64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux release dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| gcc \ | |
| make \ | |
| python3 \ | |
| cmake \ | |
| git \ | |
| pkg-config \ | |
| libasound2-dev \ | |
| libgl1-mesa-dev \ | |
| libx11-dev \ | |
| libxcursor-dev \ | |
| libxi-dev \ | |
| libxinerama-dev \ | |
| libxrandr-dev | |
| - name: Build and install Raylib | |
| run: | | |
| mkdir -p ./.cache | |
| git clone --depth 1 https://github.com/raysan5/raylib.git ./.cache/raylib-linux-src | |
| cmake -S ./.cache/raylib-linux-src -B ./.cache/raylib-linux-build \ | |
| -DBUILD_EXAMPLES=OFF \ | |
| -DBUILD_GAMES=OFF | |
| cmake --build ./.cache/raylib-linux-build -j2 | |
| sudo cmake --install ./.cache/raylib-linux-build | |
| sudo ldconfig | |
| - name: Build Linux release bundle | |
| run: | | |
| make package-release-linux \ | |
| CC=gcc \ | |
| PYTHON=python3 \ | |
| RELEASE_PLATFORM=linux-x64 \ | |
| RELEASE_ARCHIVE=./dist/engine-control-test-rig-simulator-linux-x64.tar.gz | |
| - name: Audit Linux release bundle | |
| run: | | |
| rm -rf ./dist/test-linux | |
| mkdir -p ./dist/test-linux | |
| tar -xzf ./dist/engine-control-test-rig-simulator-linux-x64.tar.gz -C ./dist/test-linux | |
| cd ./dist/test-linux/engine-control-test-rig-simulator-linux-x64 | |
| python3 tools/release_audit.py --bundle-dir . --skip-visualizer | |
| - name: Upload Linux bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-linux-x64 | |
| path: dist/engine-control-test-rig-simulator-linux-x64.tar.gz | |
| build-win64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Win64 cross-build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| gcc \ | |
| make \ | |
| python3 \ | |
| cmake \ | |
| git \ | |
| g++-mingw-w64-x86-64 \ | |
| gcc-mingw-w64-x86-64 \ | |
| binutils-mingw-w64-x86-64 \ | |
| wine64 | |
| - name: Build Win64 release bundle | |
| run: | | |
| make package-release-win64-local \ | |
| PYTHON=python3 \ | |
| RELEASE_PLATFORM=win64 \ | |
| RELEASE_ARCHIVE=./dist/engine-control-test-rig-simulator-win64.zip | |
| - name: Audit Win64 release bundle | |
| run: | | |
| rm -rf ./dist/test-win64 | |
| mkdir -p ./dist/test-win64 | |
| python3 -c 'import zipfile; zipfile.ZipFile("./dist/engine-control-test-rig-simulator-win64.zip").extractall("./dist/test-win64")' | |
| cd ./dist/test-win64/engine-control-test-rig-simulator-win64 | |
| python3 tools/release_audit.py --bundle-dir . --command-prefix wine --visualizer-timeout 5 --skip-visualization-regeneration | |
| - name: Upload Win64 bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-win64 | |
| path: dist/engine-control-test-rig-simulator-win64.zip | |
| publish: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: | |
| - build-linux-x64 | |
| - build-win64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/engine-control-test-rig-simulator-linux-x64.tar.gz | |
| dist/engine-control-test-rig-simulator-win64.zip | |
| generate_release_notes: true |