Skip to content

Add GAP distro tests #17

Add GAP distro tests

Add GAP distro tests #17

Workflow file for this run

name: Test GAP package distro
on:
pull_request:
schedule:
# Every Monday at 3:08 AM UTC
- cron: '8 3 * * 1'
workflow_dispatch:
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
gap-packages: ${{ steps.set-matrix.outputs.gap-packages }}
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: "Cache artifacts"
uses: julia-actions/cache@v2
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
- name: Get list of GAP packages
id: set-matrix
run: julia --project=. -e '
using Artifacts;
output = sprint(print, "gap-packages=", filter(startswith("f"), readdir(artifact"gap_packages")));
println(output);
open(ENV["GITHUB_OUTPUT"], "a") do io;
println(io, output);
end;'
test:
name: ${{ matrix.gap-package }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
timeout-minutes: 20
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1'
julia-arch:
- x64
os:
- ubuntu-latest
gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}}
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- name: "Cache artifacts"
uses: julia-actions/cache@v2
with:
cache-scratchspaces: false
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
- name: "Build GAP package"
run: julia --color=yes --project=. -e 'using GAP; GAP.Packages.build("${{ matrix.gap-package }}")'
- name: "Run GAP package tests"
run: julia --color=yes --project=. -e 'using GAP, Test; GAP.Packages.test("${{ matrix.gap-package }}")'