From 54ec5e8cf975e6289c6cb1e5c43819a8c950460e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Mar 2024 23:35:32 +0100 Subject: [PATCH] Add GH Actions based CI tests --- .github/workflows/CI.yml | 62 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 42 --------------------------- 2 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..420b012 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,62 @@ +name: CI + +# Trigger the workflow on push or pull request +on: + push: + branches: + - master + pull_request: + +# the `concurrency` settings ensure that not too many CI jobs run in parallel +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 master branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} + # Cancel intermediate builds, but only if it is a pull request build. + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + # The CI test job + test: + name: ${{ matrix.gap-branch }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + gap-branch: + - master + - stable-4.13 + - stable-4.12 + - stable-4.11 + + steps: + - uses: actions/checkout@v4 + - uses: gap-actions/setup-gap@v2 + with: + GAP_PKGS_TO_BUILD: "io profiling datastructures" + GAPBRANCH: ${{ matrix.gap-branch }} + - uses: gap-actions/build-pkg@v1 + - uses: gap-actions/run-pkg-tests@v2 + - uses: gap-actions/run-pkg-tests@v2 + with: + only-needed: true + - uses: gap-actions/process-coverage@v2 + - uses: codecov/codecov-action@v4 + + # The documentation job + manual: + name: Build manuals + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: gap-actions/setup-gap@v2 + - uses: gap-actions/build-pkg-docs@v1 + with: + use-latex: 'true' + - name: 'Upload documentation' + uses: actions/upload-artifact@v4 + with: + name: manual + path: ./doc/manual.pdf + if-no-files-found: error diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a1ffffc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -dist: xenial - -language: c -env: - global: - - GAP_PKGS_TO_CLONE="datastructures" - - GAP_PKGS_TO_BUILD="io profiling datastructures" - - GAP_TESTFILE="tst/testinstall.g" - -addonse: - apt_packages: - - libgmp-dev - - libreadline-dev - - zlib1g-dev - -matrix: - include: - - env: GAPBRANCH=master CFLAGS="-O2" CC=clang CXX=clang++ - compiler: clang - - env: GAPBRANCH=master CFLAGS="-O2" CC=gcc CXX=g++ - compiler: gcc - - env: GAPBRANCH=master CFLAGS="" # test build w/o optimization - - env: GAPBRANCH=stable-4.11 CFLAGS="-O2" CC=clang CXX=clang++ - compiler: clang - - env: GAPBRANCH=stable-4.11 CFLAGS="-O2" CC=gcc CXX=g++ - compiler: gcc - - env: GAPBRANCH=stable-4.11 CFLAGS="" # test build w/o optimization - - env: GAPBRANCH=master # also test on macOS (uses clang) - os: osx - -branches: - only: - - master - -before_script: - - git clone https://github.com/gap-system/pkg-ci-scripts.git scripts - - scripts/build_gap.sh -script: - - scripts/build_pkg.sh && scripts/run_tests.sh -after_script: - - scripts/gather-coverage.sh - - bash <(curl -s https://codecov.io/bash)