chore: add macos walltime profiling support #474
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: | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@v5 | |
| - uses: ./.github/actions/rust-install | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: --all-files | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ["1.24.x", "1.25.x"] | |
| env: | |
| # Needed for the quic-go test | |
| GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| submodules: true | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - uses: taiki-e/install-action@cargo-nextest | |
| - uses: ./.github/actions/rust-install | |
| - run: | | |
| cd go-runner | |
| cargo nextest run --all | |
| env: | |
| CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }} | |
| compat-integration-test-walltime: | |
| runs-on: codspeed-macro | |
| strategy: | |
| matrix: | |
| target: | |
| [ | |
| example, | |
| example/compat, | |
| example/timing, | |
| example/very/nested/module, | |
| example/external, | |
| ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@v5 | |
| - uses: ./.github/actions/rust-install | |
| - name: Run the benchmarks | |
| uses: CodSpeedHQ/action@main | |
| env: | |
| CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }} | |
| with: | |
| mode: walltime | |
| working-directory: example | |
| run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. ${{ matrix.target }} | |
| walltime-macos-test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.x" | |
| - uses: ./.github/actions/rust-install | |
| - run: cargo build --release | |
| - name: Probe go resolution with brew bin prepended | |
| run: | | |
| export PATH="/opt/homebrew/bin:$PATH" | |
| echo "PATH=$PATH" | |
| which -a go | |
| go env GOROOT || echo "go env GOROOT failed with exit $?" | |
| - name: Run the benchmarks | |
| uses: CodSpeedHQ/action@main | |
| env: | |
| PATH: /opt/homebrew/bin:${{ env.PATH }} | |
| with: | |
| run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=BenchmarkFibonacciDarwin example -benchtime=500ms | |
| working-directory: example | |
| mode: walltime | |
| go-runner-benchmarks: | |
| runs-on: codspeed-macro | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| submodules: true | |
| - uses: ./.github/actions/rust-install | |
| - name: Install cargo-codspeed | |
| run: cargo install cargo-codspeed --locked | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Build the benchmark target(s) | |
| run: cargo codspeed build -m walltime | |
| - name: Run the benchmarks | |
| uses: CodSpeedHQ/action@v4 | |
| with: | |
| mode: walltime | |
| run: cargo codspeed run | |
| check: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - lint | |
| - tests | |
| - compat-integration-test-walltime | |
| - walltime-macos-test | |
| - go-runner-benchmarks | |
| steps: | |
| - uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJson( needs ) }} |