From 1740b5ceac4dddee9c021be165b4228096aa9052 Mon Sep 17 00:00:00 2001 From: Eric Pettersen Date: Thu, 19 Sep 2024 16:28:14 -0700 Subject: [PATCH] First step toward building/testing AmberTools without screwing up daily build --- .github/workflows/test-amber.yml | 132 +++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 .github/workflows/test-amber.yml diff --git a/.github/workflows/test-amber.yml b/.github/workflows/test-amber.yml new file mode 100644 index 0000000000..0bec6c2852 --- /dev/null +++ b/.github/workflows/test-amber.yml @@ -0,0 +1,132 @@ +name: Rebuild on change + +on: + push: + branch: feature/ambertools + +jobs: + rebuild-changed-prereqs: + name: Rebuild changed prereqs + uses: ./.github/workflows/prereqs.yml + rebuild-changed-bundles: + needs: rebuild-changed-prereqs + name: Rebuild changed bundles + uses: ./.github/workflows/bundle-changes.yml + rebuild-changed-apps: + needs: rebuild-changed-prereqs + name: Rebuild changed apps + uses: ./.github/workflows/srcapps.yml + build-and-test-ubuntu: + needs: + [rebuild-changed-prereqs, rebuild-changed-bundles, rebuild-changed-apps] + name: Build ChimeraX + strategy: + matrix: + os: [ubuntu-20.04, ubuntu-22.04] + env: + PYOPENGL_PLATFORM: egl + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get update && sudo apt-get upgrade -y && ${PWD}/utils/set_up_ubuntu.sh + - run: MAKEOPTS="-j$(nproc)" make -j$(nproc) build-minimal + - name: Run the legacy test suite + run: make test + - name: Install Pytest + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + - name: Set up the repo for coverage reporting + run: make prepare-coverage + - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent + run: USE_COVERAGE=1 make pytest-both-exes + - name: Run wheel tests + run: USE_COVERAGE=1 make pytest-wheel + - name: Run distribution tests + run: USE_COVERAGE=1 make pytest-app + - name: Report coverage + run: make report-coverage + build-and-test-rocky8-docker: + needs: + [rebuild-changed-prereqs, rebuild-changed-bundles, rebuild-changed-apps] + runs-on: ubuntu-20.04 + container: + image: rockylinux:8 + env: + SHELL: /bin/bash + PATH: /usr/bin:/usr/sbin:/bin:/sbin + steps: + - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + - run: dnf update -y + - run: dnf install -y git-all + - uses: actions/checkout@v4 + # buildinfo.py breaks without this + - run: chown -R $(id -u):$(id -g) $PWD + - run: ${PWD}/utils/set_up_centos.sh + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos build-minimal + - name: Run the legacy test suite + run: make test + - name: Install Pytest + run: ./ChimeraX.app/bin/python3.11 -I -m pip install pytest pytest-cov + - name: Set up the repo for coverage reporting + run: make prepare-coverage + - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent + run: USE_COVERAGE=1 make pytest-both-exes + - name: Run wheel tests + run: USE_COVERAGE=1 make pytest-wheel + - name: Run distribution tests + run: USE_COVERAGE=1 make pytest-app + - name: Report coverage + run: make report-coverage + build-and-test-macos: + needs: + [rebuild-changed-prereqs, rebuild-changed-bundles, rebuild-changed-apps] + runs-on: macos-latest + steps: + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - uses: actions/checkout@v4 + - run: ${PWD}/utils/set_up_macos.sh + - run: MAKEOPTS="-j$(sysctl -n hw.logicalcpu)" make -j$(sysctl -n hw.logicalcpu) build-minimal + - name: Run the legacy test suite + run: make test + - name: Install Pytest + run: ./ChimeraX.app/Contents/bin/python3.11 -I -m pip install pytest pytest-cov + - name: Set up the repo for coverage reporting + run: make prepare-coverage + - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent + run: USE_COVERAGE=1 make pytest-both-exes + - name: Run wheel tests + run: USE_COVERAGE=1 make pytest-wheel + - name: Run distribution tests + run: USE_COVERAGE=1 make pytest-app + - name: Report coverage + run: make report-coverage + build-and-test-windows: + needs: + [rebuild-changed-prereqs, rebuild-changed-bundles, rebuild-changed-apps] + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v4 + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: git mingw-w64-x86_64-imagemagick mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-objc mingw-w64-x86_64-gcc-fortran rsync patch unzip openssh make mingw-w64-x86_64-autotools + - run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && MAKEOPTS="-j$(nproc)" make -j$(nproc) build-minimal + - name: Run the legacy test suite + run: AUTOMATIC_DISCOVERY=1 . ./vsvars.sh && make test + - name: Install Pytest + run: ./ChimeraX.app/bin/python.exe -I -m pip install pytest pytest-cov + - name: Set up the repo for coverage reporting + run: make prepare-coverage + - name: Check whether ChimeraX.exe and python -m chimerax.core are equivalent + run: USE_COVERAGE=1 make pytest-both-exes + - name: Run wheel tests + run: USE_COVERAGE=1 make pytest-wheel + - name: Run distribution tests + run: USE_COVERAGE=1 make pytest-app + - name: Report coverage + run: make report-coverage