Skip to content

Added cargo_build_info rule #86

Added cargo_build_info rule

Added cargo_build_info rule #86

Workflow file for this run

name: Determinism

Check failure on line 1 in .github/workflows/determinism.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/determinism.yaml

Invalid workflow file

(Line: 17, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUNNER_TEMP, (Line: 19, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUNNER_TEMP
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- test/determinism/**
jobs:
check:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
work_dir: ${{ env.RUNNER_TEMP }}/r
- os: ubuntu-latest
work_dir: ${{ env.RUNNER_TEMP }}/r
- os: windows-latest
work_dir: C:\r
runs-on: ${{ matrix.os }}
name: Check (${{ matrix.os }})
steps:
- uses: actions/checkout@v4
with:
clean: true
- name: Run tests
continue-on-error: true
run: |
bazel run \
--compilation_mode=opt \
//test/determinism:tester \
-- test \
--output="${{ github.workspace }}/results.json" \
--work-dir="${{ matrix.work_dir }}"
- name: Summarize (unix)
if: runner.os != 'Windows'
shell: bash
run: |
if [[ ! -f results.json ]]; then
exit 1
fi
{
echo '<details>'
echo
echo '```json'
cat results.json
echo
echo '```'
echo
echo '</details>'
} >> "$GITHUB_STEP_SUMMARY"
if [[ "$(cat results.json)" != "[]"* ]]; then
exit 1
fi
- name: Summarize (windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
if (-not (Test-Path results.json)) { exit 1 }
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '<details>'
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ''
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```json'
Get-Content -Path results.json | Add-Content -Path $env:GITHUB_STEP_SUMMARY
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ''
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '```'
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ''
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '</details>'
$content = Get-Content -Path results.json -Raw
if (-not $content.StartsWith('[]')) { exit 1 }
- name: Archive output base (unix)
if: runner.os != 'Windows' && always()
shell: bash
run: |
if [[ -d "${{ matrix.work_dir }}/o" ]]; then
tar -czf output-base.tar.gz -C "${{ matrix.work_dir }}" o
fi
- name: Archive output base (windows)
if: runner.os == 'Windows' && always()
shell: pwsh
run: |
if (Test-Path "${{ matrix.work_dir }}\o") {
Compress-Archive -Path "${{ matrix.work_dir }}\o" -DestinationPath output-base.zip
}
- name: Upload output base artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: output-base-${{ matrix.os }}
path: |
output-base.tar.gz
output-base.zip
if-no-files-found: ignore