Build Native Binaries #21
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: Build Native Binaries | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| output: [vma-library, tracy-library, tracy-exe] | |
| os: [ubuntu-24.04, windows-2025, macos-15] | |
| name: ${{ matrix.output }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Enable long paths for Git (Windows) | |
| if: "runner.os == 'Windows'" | |
| run: git config --system core.longpaths true | |
| - name: Setup dependencies (Linux) | |
| if: "runner.os == 'Linux'" | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libglfw3-dev libfreetype-dev libcapstone-dev libdbus-1-dev libtbb-dev libgtk-3-dev debuginfod libwayland-dev libxkbcommon-dev libglvnd-dev wayland-protocols | |
| - name: Setup dependencies (Mac) | |
| if: "runner.os == 'macOS'" | |
| run: | | |
| brew update | |
| brew install glfw freetype capstone tbb | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "10.0.100" | |
| - name: Cache .git folder | |
| uses: actions/cache@v4 | |
| with: | |
| path: .git | |
| key: git-{{ hashFiles('**/.gitmodules') }} | |
| - name: Checkout repository | |
| uses: actions/[email protected] | |
| with: | |
| repository: Exanite-GameDev/Exanite.GameDev | |
| token: ${{ secrets._GITHUB_TOKEN }} | |
| submodules: recursive | |
| lfs: false | |
| - name: Setup build system | |
| run: dotnet build projects/Exanite.Engine.BuildSystem | |
| - name: Build | |
| run: dotnet run --project projects/Exanite.Engine.BuildSystem -- build-${{ matrix.output }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.output }}-${{ matrix.os }} | |
| path: outputs/native | |
| combine-outputs: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [build] | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: artifacts | |
| - name: Combine into one folder | |
| run: | | |
| mkdir combined | |
| cp -r artifacts/*/* combined | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: combined | |
| path: combined |