Generate benchmarks.csv, make plot and build site #140
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: Benchmarks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags: '*' | |
| workflow_dispatch: | |
| concurrency: | |
| # Skip intermediate builds: all builds except for builds on the `master` or `release-*` branches | |
| # Cancel intermediate builds: only pull request builds | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| java-version: ['24'] | |
| julia-version: ['1'] # Note: use the latest Julia version | |
| python-version: ['3.13'] | |
| numpy-version: ['2.3'] | |
| gfortran-version: ['14.2'] # Note: unused since is built-in. | |
| rust-version: ['1.88.0'] # Note: unused since controlled by `rust/rust-toolchain` | |
| js-version: ['24'] | |
| r-version: ['4.5.1'] | |
| lua-version: ['latest'] # Note: unused since lua distribution manually downloaded | |
| # go-version: ['1.24.5'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: "Set up dSFMT" | |
| run: | | |
| mkdir -p dSFMT | |
| cd dSFMT | |
| wget -q https://github.com/MersenneTwister-Lab/dSFMT/archive/refs/tags/v2.2.4.tar.gz | |
| echo "39682961ecfba621a98dbb6610b6ae2b7d6add450d4f08d8d4edd0e10abd8174 v2.2.4.tar.gz" | sha256sum --check --status | |
| tar -xzf v2.2.4.tar.gz | |
| mv dSFMT-*/* ./ | |
| cd .. | |
| - name: "Set up OpenBLAS" | |
| run: | | |
| sudo apt-get install -y libopenblas-dev | |
| - name: "Set up Julia" | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| ref: v${{ matrix.julia-version }} | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: "Set up NumPy" | |
| run: pip install numpy==${{ matrix.numpy-version }} | |
| - name: "Set up Rust" | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| - name: "Set up Java" | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java-version }} | |
| cache: 'maven' | |
| - name: "Set up JavaScript" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.js-version }} | |
| - name: "Set up R" | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.r-version }} | |
| - name: "Set up LuaJit" | |
| run: | | |
| cd ~/work/Microbenchmarks.jl/Microbenchmarks.jl/lua | |
| ./lua-install.sh | |
| # - name: "Set up Go" | |
| # uses: actions/setup-go@v5 | |
| # with: | |
| # go-version: ${{ matrix.go-version }} | |
| - name: "Run benchmark" | |
| run: | | |
| make gh_action_benchmarks.html | |
| - name: "Print benchmark data" | |
| run: cat gh_action_benchmarks.csv | |
| - name: "Build site" | |
| run: | | |
| julia --color=yes --project=docs -e 'using Pkg; Pkg.instantiate()' | |
| julia --color=yes --project=docs --compiled-modules=existing docs/make.jl | |
| - name: "Deploy site" | |
| uses: julia-actions/julia-docdeploy@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |