More statistical information #372
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| deployments: write | |
| jobs: | |
| build: | |
| name: ${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.compiler }} | |
| runs-on: ${{ matrix.run-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| run-on: [ubuntu-24.04, windows-latest] | |
| compiler: [any] | |
| include: | |
| - run-on: windows-latest | |
| triplet: x64-windows-static-release | |
| arch: x86_64 | |
| platform: windows | |
| compiler: msvc | |
| - run-on: ubuntu-24.04 | |
| triplet: x64-linux-release | |
| arch: x86_64 | |
| platform: linux | |
| compiler: gcc | |
| - run-on: ubuntu-24.04 | |
| triplet: x64-linux-release | |
| arch: x86_64 | |
| platform: linux | |
| compiler: clang | |
| exclude: | |
| - compiler: any | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | |
| VCPKG_GIT_COMMIT_ID: "c82f74667287d3dc386bce81e44964370c91a289" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: 'false' | |
| - name: Create LFS file list | |
| shell: pwsh | |
| run: git lfs ls-files -l | ForEach-Object { $_.split(" ")[0] } | Sort-Object | Out-File .lfs-assets-id | |
| - name: Restore LFS cache | |
| uses: actions/cache@v4 | |
| id: lfs-cache | |
| with: | |
| path: .git/lfs | |
| key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 | |
| - name: Git LFS Pull | |
| shell: pwsh | |
| run: | | |
| $env:GIT_TRACE=1 | |
| git lfs pull | |
| - uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: "~3.25.0" | |
| ninjaVersion: "^1.11.1" | |
| - uses: TheMrMilchmann/setup-msvc-dev@v2 | |
| if: runner.os == 'Windows' | |
| with: | |
| arch: x64 | |
| - name: Set vcpkg root (Windows) | |
| if: runner.os == 'Windows' | |
| run: echo "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - name: Set vcpkg root (!Windows) | |
| if: runner.os != 'Windows' | |
| run: echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> "$GITHUB_ENV" | |
| - name: Setup clang | |
| if: runner.os == 'Linux' && matrix.compiler == 'clang' | |
| run: | | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| with: | |
| vcpkgDirectory: "${{ env.VCPKG_ROOT }}" | |
| vcpkgGitCommitId: "${{ env.VCPKG_GIT_COMMIT_ID }}" | |
| - name: Restore vcpkg cache | |
| id: vcpkg-cache | |
| uses: TAServers/vcpkg-cache@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| prefix: vcpkg-${{ matrix.triplet }}-${{ matrix.compiler }}/ | |
| - name: Build & Test project | |
| env: | |
| VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite" | |
| run: | | |
| cd '${{ github.workspace }}' | |
| cmake --preset ci-${{matrix.platform}} . -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release "-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}" "-DVCPKG_INSTALL_OPTIONS=--debug" | |
| cmake --build --preset ci-${{matrix.platform}} . | |
| ctest --preset ci-${{matrix.platform}} | |
| - name: Install | |
| run: | | |
| cmake --install ${{ github.workspace }}/build/ci-${{matrix.platform}} --component server --prefix ${{ github.workspace }}/install/server | |
| cmake --install ${{ github.workspace }}/build/ci-${{matrix.platform}} --component tools --prefix ${{ github.workspace }}/install/tools | |
| - name: Create build info | |
| shell: pwsh | |
| run: | | |
| "ref: ${{ github.ref_name }}`n" + ` | |
| "commit: ${{ github.sha }}`n" + ` | |
| "date: $(Get-Date -UFormat '%FT%T%Z' -AsUTC)" | Out-File -Path "${{ github.workspace }}/install/info.txt" | |
| cp ${{ github.workspace }}/install/info.txt ${{ github.workspace }}/install/server/bin/ | |
| cp ${{ github.workspace }}/install/info.txt ${{ github.workspace }}/install/tools/bin/ | |
| - name: Upload server binaries | |
| uses: actions/upload-artifact@v4 | |
| if: runner.os != 'Linux' || matrix.compiler == 'gcc' | |
| with: | |
| name: snail-server-${{ matrix.arch }}-${{ matrix.platform }} | |
| path: | | |
| ${{ github.workspace }}/install/server/bin/snail-server* | |
| !${{ github.workspace }}/install/server/bin/snail-server*.pdb | |
| ${{ github.workspace }}/install/server/bin/info.txt | |
| - name: Upload tool binaries | |
| uses: actions/upload-artifact@v4 | |
| if: runner.os != 'Linux' || matrix.compiler == 'gcc' | |
| with: | |
| name: snail-tools-${{ matrix.arch }}-${{ matrix.platform }} | |
| path: | | |
| ${{ github.workspace }}/install/tools/bin/snail-tool-* | |
| !${{ github.workspace }}/install/tools/bin/snail-tool-*.pdb | |
| ${{ github.workspace }}/install/tools/bin/info.txt | |
| - name: Upload server debug symbols | |
| uses: actions/upload-artifact@v4 | |
| if: runner.os == 'Windows' | |
| with: | |
| name: snail-server-${{ matrix.arch }}-${{ matrix.platform }}-debug-symbols | |
| path: | | |
| ${{ github.workspace }}/install/server/bin/snail-server*.pdb | |
| ${{ github.workspace }}/install/server/bin/info.txt | |
| - name: Upload tool debug symbols | |
| uses: actions/upload-artifact@v4 | |
| if: runner.os == 'Windows' | |
| with: | |
| name: snail-tools-${{ matrix.arch }}-${{ matrix.platform }}-debug-symbols | |
| path: | | |
| ${{ github.workspace }}/install/tools/bin/snail-tool-*.pdb | |
| ${{ github.workspace }}/install/tools/bin/info.txt |