Build Module #61
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 Module | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: { } | |
| pull_request: | |
| paths: | |
| - 'Module/**/*' | |
| push: | |
| branches: | |
| - stable | |
| - ver/* | |
| paths: | |
| - '.github/workflows/build-module.yaml' | |
| - 'Module/**/*' | |
| jobs: | |
| build: | |
| runs-on: blacksmith-16vcpu-windows-2025 | |
| env: | |
| working-directory: ./Module | |
| steps: | |
| - name: Get branch names | |
| id: branch-names | |
| uses: tj-actions/branch-names@v8 | |
| - name: Git Checkout | |
| uses: actions/checkout@v4 | |
| - name: Mount Bazel Cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: "${{ runner.temp }}/bazelCache" | |
| key: bazel | |
| - name: Build | |
| working-directory: ${{env.working-directory}} | |
| run: bazel --output_user_root="C:\bz" build --config=release Kyber | |
| - name: Download Dependencies | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| working-directory: ${{env.working-directory}} | |
| run: | | |
| New-Item -Path _work -ItemType Directory | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest https://s3.kyber.gg/artifacts/kyber-depends.zip -OutFile depends.zip | |
| Expand-Archive depends.zip -DestinationPath _work | |
| shell: powershell | |
| - name: Setup Sentry CLI | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| uses: mathieu-bour/setup-sentry-cli@v2 | |
| with: | |
| token: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| url: ${{ secrets.SENTRY_URL }} | |
| organization: kyber | |
| project: module | |
| - name: Upload PDB | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| continue-on-error: true | |
| working-directory: ${{env.working-directory}} | |
| run: | | |
| sentry-cli debug-files upload --project module --include-sources bazel-bin/Kyber.pdb | |
| shell: powershell | |
| - name: Copy DLL | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| working-directory: ${{env.working-directory}} | |
| run: | | |
| cp "bazel-bin/Kyber.dll" "_work/Kyber.dll" | |
| - name: Zip files | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| working-directory: ${{env.working-directory}} | |
| run: | | |
| Compress-Archive -Path "_work/*" -DestinationPath kyber-module.zip | |
| shell: powershell | |
| - name: Upload Artifacts | |
| if: github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/heads/ver/') || github.event_name == 'workflow_dispatch' | |
| working-directory: ${{env.working-directory}} | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest https://dl.min.io/client/mc/release/windows-amd64/mc.exe -OutFile _work/mc.exe | |
| _work/mc.exe alias set kyber https://s3.kyber.gg ${{ secrets.AWS_KEY_ID }} ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| _work/mc.exe cp kyber-module.zip kyber/releases/${{ steps.branch-names.outputs.current_branch }}/kyber-module.zip | |
| shell: powershell |