parallelize tests #2289
Workflow file for this run
This file contains 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 | |
tags: '*' | |
pull_request: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{matrix.testset}} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.10.6' | |
- '1' | |
os: | |
- ubuntu-latest | |
- windows-latest | |
arch: | |
- x64 | |
- x86 | |
testset: | |
- 'algebra constructors continuous continuous_examples docs' | |
- 'examples fileio galley index interface_einsum interface_asmd' | |
- 'interface_issues issues kernels merges parallel print' | |
- 'representation1d representation2d scheduler simple typical' | |
exclude: | |
- os: ubuntu-latest | |
arch: x86 | |
- os: windows-latest | |
arch: x64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-test- | |
${{ runner.os }}- | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Set and Retrieve Github ENV variables | |
shell: bash | |
run: | | |
echo "JULIA_NUM_THREADS=2 FINCH_TEST_ARGS='-i ${{matrix.testset}}'" >> $GITHUB_ENV | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v5 | |
with: | |
files: lcov.info | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1' | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-docdeploy@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
finch-tensor-tests: | |
name: Python tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Finch.jl | |
uses: actions/checkout@v4 | |
- name: Setup Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1' | |
- name: Build Finch.jl package | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Checkout finch-tensor-python | |
uses: actions/checkout@v4 | |
with: | |
repository: finch-tensor/finch-tensor-python | |
ref: 'main' | |
path: 'finch-tensor-python' | |
- name: Install package | |
run: | | |
cd finch-tensor-python | |
poetry install --with test | |
- name: Run finch-tensor-python tests | |
run: | | |
cd finch-tensor-python | |
FINCH_REPO_PATH="${GITHUB_WORKSPACE}" poetry run pytest tests/ |