Add scip-clang code intelligence indexing via GitHub Actions #118
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: nix_p4-fusion | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| x86_64-darwin: | |
| name: Build p4-fusion x86_64-darwin | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: '🔓 Authenticate to Google Cloud' | |
| uses: google-github-actions/auth@v1 | |
| with: | |
| credentials_json: ${{ secrets.CTAGS_GCP_SERVICE_ACCOUNT }} | |
| - name: Run `nix build` | |
| run: | | |
| nix build .#p4-fusion_openssl1_1-static | |
| - name: Sign the binary | |
| # signing in ./result/bin will cause a cache miss on next invocation | |
| run: | | |
| mkdir -p dist | |
| cp -L ./result/bin/p4-fusion* ./dist/ | |
| sudo codesign --force -s - ./dist/p4-fusion* | |
| - name: Rename and prepare for upload | |
| run: | | |
| cd ./dist/ && ls | xargs -I{} mv {} "{}.$(git rev-parse --short HEAD)" | |
| - name: Show hash of p4-fusion | |
| run: | | |
| shasum -a 256 ./dist/p4-fusion* | |
| - uses: google-github-actions/upload-cloud-storage@v1 | |
| # github.head_ref is only available for pull requests | |
| # if the event type is not pull_requet we have to use github.ref_name | |
| if: ${{ github.ref_name == 'master' }} | |
| with: | |
| path: './dist/' | |
| destination: 'p4-fusion/x86_64-darwin/' | |
| glob: 'p4-fusion*' | |
| aarch64-darwin: | |
| name: Build p4-fusion aarch64-darwin | |
| runs-on: macos-latest-xlarge | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: '🔓 Authenticate to Google Cloud' | |
| uses: google-github-actions/auth@v1 | |
| with: | |
| credentials_json: ${{ secrets.CTAGS_GCP_SERVICE_ACCOUNT }} | |
| - name: Run `nix build` | |
| run: | | |
| nix build .#p4-fusion_openssl1_1-static | |
| - name: Sign the binary | |
| # signing in ./result/bin will cause a cache miss on next invocation | |
| run: | | |
| mkdir -p dist | |
| cp -L ./result/bin/p4-fusion* ./dist/ | |
| sudo codesign --force -s - ./dist/p4-fusion* | |
| - name: Rename and prepare for upload | |
| run: | | |
| cd ./dist/ && ls | xargs -I{} mv {} "{}.$(git rev-parse --short HEAD)" | |
| - name: Show hash of p4-fusion | |
| run: | | |
| shasum -a 256 ./dist/p4-fusion* | |
| - uses: google-github-actions/upload-cloud-storage@v1 | |
| # github.head_ref is only available for pull requests | |
| # if the event type is not pull_requet we have to use github.ref_name | |
| if: ${{ github.ref_name == 'master' }} | |
| with: | |
| path: './dist/' | |
| destination: 'p4-fusion/aarch64-darwin/' | |
| glob: 'p4-fusion*' | |
| x86_64-linux: | |
| name: Build p4-fusion x86_64-linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: '🔓 Authenticate to Google Cloud' | |
| uses: google-github-actions/auth@v1 | |
| with: | |
| credentials_json: ${{ secrets.CTAGS_GCP_SERVICE_ACCOUNT }} | |
| - name: Run `nix build` | |
| run: | | |
| nix build .#p4-fusion_openssl1_1-static | |
| - name: Rename and prepare for upload | |
| run: | | |
| mkdir -p dist | |
| cp -R -L ./result/bin/p4-fusion* dist/ | |
| cd dist/ && ls | xargs -I{} mv {} "{}.$(git rev-parse --short HEAD)" | |
| - name: Show hash of p4-fusion | |
| run: | | |
| shasum -a 256 ./dist/p4-fusion* | |
| - uses: google-github-actions/upload-cloud-storage@v1 | |
| # github.head_ref is only available for pull requests | |
| # if the event type is not pull_requet we have to use github.ref_name | |
| if: ${{ github.ref_name == 'master' }} | |
| with: | |
| path: './dist/' | |
| destination: 'p4-fusion/x86_64-linux/' | |
| glob: 'p4-fusion*' | |
| report_failure: | |
| needs: [aarch64-darwin, x86_64-darwin, x86_64-linux] | |
| if: ${{ failure() }} | |
| uses: sourcegraph/workflows/.github/workflows/report-job-failure.yml@main | |
| secrets: inherit |