From 78288c616eb4459c91cb42ceee7e7f10822e00bb Mon Sep 17 00:00:00 2001 From: Luochenghuang Date: Fri, 29 May 2026 13:44:41 -0700 Subject: [PATCH 1/2] Migrate CI from Travis to GitHub Actions Replaces the Travis configuration with an equivalent GitHub Actions workflow at .github/workflows/ci.yml. Same matrix (ubuntu-latest + macos-latest), same build pipeline (autogen.sh, make, make check, make install), same on-failure log dump for utils/*.log. Two minor modernizations: - Switches the Ubuntu guile package from guile-2.0-dev to guile-3.0-dev. guile-2.0 was dropped from Ubuntu after 20.04; libctl already builds and runs against guile 3.0. - macOS dependency install adds autoconf/automake/libtool explicitly rather than relying on the runner image to provide them. Workflow triggers on push to master, pull_request to master, and manual workflow_dispatch. fail-fast disabled so a failure on one OS doesn't cancel the other. Also removes the Travis CI badge from README.md and replaces it with a GitHub Actions badge pointing at the new workflow. --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 29 -------------------------- README.md | 2 +- 3 files changed, 46 insertions(+), 30 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..a4842b1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + +jobs: + build: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake libtool guile-3.0-dev + + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install autoconf automake libtool guile + + - name: Build and test + run: | + sh autogen.sh --prefix=$PWD/.local + make + make check + make install + + - name: Print test logs on failure + if: failure() + run: | + for log in utils/*.log; do + [ -f "$log" ] && { echo "=== $log ==="; cat "$log"; } + done diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d6367c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: c -sudo: false - -matrix: - include: - - os: linux - addons: - apt: - packages: - - autoconf - - automake - - libtool - - guile-2.0-dev - script: - - sh autogen.sh --prefix=`pwd`/.local - - make && make check && make install - - rm -rf * ~/.local - - os: osx - install: - - brew update - - brew install guile - script: - - sh autogen.sh --prefix=`pwd`/.local - - make && make check && make install - - rm -rf * ~/.local - -after_script: - - PRISM_LOG=${TRAVIS_BUILD_DIR}/utils/test-prism.log - - if [[ -e ${PRISM_LOG} ]]; then cat ${PRISM_LOG}; fi diff --git a/README.md b/README.md index d127bbd..fc0bd37 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Latest Docs](https://readthedocs.org/projects/pip/badge/?version=latest)](http://libctl.readthedocs.io/en/latest/) -[![Build Status](https://travis-ci.org/NanoComp/libctl.svg?branch=master)](https://travis-ci.org/NanoComp/libctl) +[![CI](https://github.com/NanoComp/libctl/actions/workflows/ci.yml/badge.svg)](https://github.com/NanoComp/libctl/actions/workflows/ci.yml) This is libctl, a [Guile](http://www.gnu.org/software/guile/)-based library for supporting flexible control files in scientific simulations. From ffa63aa69c8416febf15280c2b9d647ec28f4835 Mon Sep 17 00:00:00 2001 From: Luochenghuang Date: Fri, 29 May 2026 14:01:10 -0700 Subject: [PATCH 2/2] CI: drop macOS, add OMP_NUM_THREADS matrix to exercise parallel tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drops the macos-latest matrix entry per maintainer preference (less useful: project is primarily Linux-targeted, macOS runners cost more minutes, and the existing Travis macOS coverage didn't exercise anything Linux didn't). Adds --enable-openmp to the configure step and matrices the run on OMP_NUM_THREADS = 1 and 8. Both values share the same build; only the runtime thread count differs. This catches regressions in the parallel test paths (test-prism's #pragma omp parallel for loops in test_point_inclusion, test_normal_to_object, and test_line_segment_intersection) that a serial-only run wouldn't flag — same matrix philosophy used to validate the prism thread-safety work in PR #75 / #81. --- .github/workflows/ci.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4842b1..ea1acf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,30 +9,26 @@ on: jobs: build: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: linux (OMP_NUM_THREADS=${{ matrix.omp_threads }}) + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + omp_threads: [1, 8] + env: + OMP_NUM_THREADS: ${{ matrix.omp_threads }} steps: - uses: actions/checkout@v4 - - name: Install dependencies (Ubuntu) - if: runner.os == 'Linux' + - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y autoconf automake libtool guile-3.0-dev - - name: Install dependencies (macOS) - if: runner.os == 'macOS' - run: | - brew install autoconf automake libtool guile - - name: Build and test run: | - sh autogen.sh --prefix=$PWD/.local + sh autogen.sh --prefix=$PWD/.local --enable-openmp make make check make install