Skip to content

[CI] Dynamically generate list of packages to test #683

[CI] Dynamically generate list of packages to test

[CI] Dynamically generate list of packages to test #683

Workflow file for this run

name: Integration
on:
pull_request:
paths:
- '.github/workflows/Integration.yml'
- 'ext/**'
- 'lib/**'
- 'src/**'
- 'test/integration/**'
- 'Project.toml'
push:
branches:
- main
paths:
- release-*
- '.github/workflows/Integration.yml'
- 'ext/**'
- 'lib/**'
- 'src/**'
- 'test/integration/**'
- 'Project.toml'
tags: '*'
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:
generate-packages-list:
name: Generate list of packages for integration tests
runs-on: ubuntu-latest
outputs:
set-packages: ${{ steps.set-packages.outputs.set-packages }}
steps:
- uses: actions/checkout@v5
- uses: julia-actions/setup-julia@v2
- name: Set packages
id: set-packages
shell: julia --color=yes {0}
run: |
all_pkgs = readdir("test/integration")
filtered_pkgs = all_pkgs
pkgs = string("packages=", filtered_pkgs)
open(ENV["GITHUB_OUTPUT"], "w") do io
print(stdout, pkgs)
print(io, pkgs)
end
integration:
needs: generate-packages-list
timeout-minutes: 45
name: Integration Tests - ${{ matrix.package }} - Julia ${{ matrix.version }}
runs-on: ${{ matrix.os }}
container:
image: ${{ (contains(matrix.os, 'linux') && 'ghcr.io/enzymead/reactant-docker-images@sha256:91e1edb7a7c869d5a70db06e417f22907be0e67ca86641d48adcea221fedc674' ) || '' }}
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.generate-packages-list.outputs.set-packages) }}
version:
- '1.10'
- '1.11'
os:
- linux-x86-n2-32
exclude:
- version: '1.10'
os: linux-x86-n2-32
package: Molly
steps:
- run: |
echo "Hello from ${{ matrix.package }} in Julia ${{ matrix.version }}"
# - uses: actions/checkout@v5
# - uses: julia-actions/setup-julia@v2
# with:
# version: ${{ matrix.version }}
# - uses: julia-actions/cache@v2
# - name: "Install Dependencies"
# run: |
# julia --color=yes --project=test/integration/${{ matrix.package }} --threads=auto --check-bounds=yes -O1 -e 'using Pkg; Pkg.develop([PackageSpec(; path) for path in (".", "lib/EnzymeCore")])'
# shell: bash
# if: ${{ matrix.version == '1.10' }}
# - name: "Instantiate"
# run: |
# julia --color=yes --project=test/integration/${{ matrix.package }} --threads=auto --check-bounds=yes -O1 -e 'using Pkg; Pkg.instantiate()'
# shell: bash
# - name: "Run tests"
# run: |
# julia --color=yes --project=test/integration/${{ matrix.package }} --threads=auto --check-bounds=yes -O1 test/integration/${{ matrix.package }}/runtests.jl
# shell: bash