Scoped contexts and a proper precompilation workload #226
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: | |
| pull_request: | |
| # branches: | |
| # - 'master' | |
| # - 'release-*' | |
| push: | |
| branches: | |
| - 'master' | |
| - 'release-*' | |
| tags: '*' | |
| concurrency: | |
| # Skip intermediate builds: all builds except for builds on the `main` or `release-*` branches | |
| # Cancel intermediate builds: only pull request builds | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || 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 }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - '1.10' | |
| - '1' | |
| - 'nightly' | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest # Apple Silicon | |
| julia-wordsize: | |
| # The value here only affects the version of Julia binary that we download. | |
| # It does not affect the architecture of the GitHub Runner (virtual machine) that | |
| # we run on. | |
| - '64' # 64-bit Julia. | |
| exclude: | |
| # Killing workers doesn't work on Windows in Julia 1.10: | |
| # (It does work on 1.11+) | |
| - os: windows-latest | |
| version: '1.10' | |
| include: | |
| - os: ubuntu-latest | |
| julia-wordsize: '32' | |
| version: '1' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: ${{ matrix.version }} | |
| # If `julia-wordsize` is 32, then we set `arch` to `x86`, because we know that | |
| # 32-bit builds of Julia are only available for x86. | |
| # | |
| # If `julia-wordsize` is 64, then we set `arch` to `${{ runner.arch }}`, which | |
| # GitHub will automatically expand to the correct value (`x86_64` or `aarch64`) | |
| # based on the architecture of the underlying GitHub Runner (virtual machine). | |
| arch: ${{ github.ref == '32' && 'x86' || runner.arch }} | |
| - uses: julia-actions/cache@v3 | |
| - name: Decide what the value of JULIA_NUM_THREADS should be | |
| id: decide-numthreads-str | |
| run: | | |
| if Base.VERSION >= v"1.12-" | |
| # The x,y format for threadpools requires Julia 1.9 or above. | |
| # However, Julia didn't begin starting with 1 interactive thread by default until Julia 1.12 | |
| # So we don't need to bother with this on Julia 1.11 and earlier | |
| value = "1,0" | |
| else | |
| value = "1" | |
| end | |
| open(ENV["GITHUB_OUTPUT"], "a") do io | |
| name = "numthreads" | |
| line = "$(name)=$(value)" | |
| println(io, line) | |
| end | |
| shell: julia --color=yes {0} | |
| - uses: julia-actions/julia-runtest@v1 | |
| env: | |
| JULIA_NUM_THREADS: ${{ steps.decide-numthreads-str.outputs.numthreads }} | |
| - uses: julia-actions/julia-processcoverage@v1 | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # necessary to be able to push to the gh-pages branch | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/setup-julia@latest | |
| with: | |
| version: '1' | |
| - uses: julia-actions/cache@v3 | |
| - name: Install dependencies | |
| run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()' | |
| - name: Build and deploy | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: julia --project=docs/ docs/make.jl | |
| jet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/setup-julia@latest | |
| with: | |
| version: '1' | |
| # version: 'nightly' | |
| - uses: julia-actions/cache@v3 | |
| - run: julia --color=yes --project=ci/jet -e 'import Pkg; Pkg.instantiate()' | |
| - name: Run the JET tests | |
| run: julia --color=yes --project=ci/jet ci/jet/check.jl |