diff --git a/.github/workflows/check-for-changes.yml b/.github/workflows/check-for-changes.yml index 860f2bab5..94dd573b8 100644 --- a/.github/workflows/check-for-changes.yml +++ b/.github/workflows/check-for-changes.yml @@ -5,14 +5,13 @@ on: branches: [develop, release/*] jobs: - build-and-test-rocky9-docker: - runs-on: ubuntu-22.04 + build-and-test-rocky8-docker: + runs-on: ubuntu-20.04 container: - image: rockylinux:9 + image: rockylinux:8 env: SHELL: /bin/bash PATH: /usr/bin:/usr/sbin:/bin:/sbin - PYOPENGL_PLATFORM: egl steps: - run: export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 - run: dnf update -y diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1283a2037..9ed8feb96 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,6 +5,12 @@ on: - cron: "0 7 * * *" # 7AM UTC / 11PM PST / 12AM PDT jobs: + build-rocky8-docker: + name: Build ChimeraX for Rocky 8 + uses: ./.github/workflows/rocky8_build.yml + with: + release_type: daily + secrets: inherit build-rocky9-docker: name: Build ChimeraX for Rocky 9 needs: [build-rocky8-docker] @@ -14,14 +20,14 @@ jobs: secrets: inherit build-ubuntu: name: Build ChimeraX for Ubuntu - needs: [build-rocky9-docker] + needs: [build-rocky8-docker] uses: ./.github/workflows/ubuntu_build.yml with: release_type: daily secrets: inherit build-flatpak: name: Build ChimeraX FlatPak - needs: [build-rocky9-docker] + needs: [build-rocky8-docker] uses: ./.github/workflows/flatpak_build.yml with: release_type: daily diff --git a/.github/workflows/rocky8_build.yml b/.github/workflows/rocky8_build.yml new file mode 100644 index 000000000..eeb447f4a --- /dev/null +++ b/.github/workflows/rocky8_build.yml @@ -0,0 +1,93 @@ +name: Build ChimeraX for Rocky 8 +on: + workflow_call: + inputs: + release_type: + type: string + required: true + branch: + type: string + required: false + secrets: + PREBUILT_CACHE_SECRET: + required: true + +jobs: + build-rocky8-docker: + name: Build ChimeraX for Rocky 8 + 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 + with: + ref: ${{ inputs.branch || 'develop' }} + # buildinfo.py breaks without this + - run: chown -R $(id -u):$(id -g) $PWD + - run: ${PWD}/utils/set_up_centos.sh + - name: Fetch Plato prerequisites + uses: ./utils/ci/consolidated_cache + with: + platform: linux + architecture: x86_64 + cache_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - uses: Tiryoh/gha-jobid-action@v1 + id: get_job_id + with: + job_name: "Build ChimeraX for Rocky 8 / Build ChimeraX for Rocky 8" + - name: Note the run and job IDs on Plato + uses: ./utils/ci/nightly_logs + with: + platform: centos-8 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + run_id: ${{ github.run_id }} + job_id: ${{ steps.get_job_id.outputs.job_id }} + build_type: daily + - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - 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 + - name: Build the Rocky 8 package + run: make -f Makefile.centos ${{ inputs.release_type }}-package + - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm + - name: Upload ChimeraX + uses: ./utils/ci/upload_artifact + with: + artifact_path: chimerax.rpm + full_build: true + release_type: ${{ inputs.release_type }} + platform: centos-8 + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Upload documentation + uses: ./utils/ci/upload_docs + with: + deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} + - name: Tar bundles and includes for other builds + run: | + export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync + tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . + tar -cvzf linux-include.tar.gz -C build include + - name: Cache the bundles and includes + uses: actions/cache/save@v4 + with: + path: | + linux-bundles.tar.gz + linux-include.tar.gz + key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/rocky9_build.yml b/.github/workflows/rocky9_build.yml index bd604156d..dc47c778f 100644 --- a/.github/workflows/rocky9_build.yml +++ b/.github/workflows/rocky9_build.yml @@ -14,7 +14,6 @@ on: jobs: build-rocky9-docker: - name: Build ChimeraX for Rocky 9 runs-on: ubuntu-20.04 container: image: rockylinux:9 @@ -50,7 +49,29 @@ jobs: run_id: ${{ github.run_id }} job_id: ${{ steps.get_job_id.outputs.job_id }} build_type: daily - - run: source /opt/rh/gcc-toolset-10/enable && MAKEOPTS="-j$(nproc)" make -j$(nproc) -f Makefile.centos install-rbvi + - name: Restore bundles and includes from cache + uses: actions/cache/restore@v4 + with: + path: | + linux-bundles.tar.gz + linux-include.tar.gz + key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} + - name: Unpack the bundles to build/sync + run: | + mkdir wheels + tar -xvf linux-bundles.tar.gz -C wheels + - name: Unpack the include tarball to include + run: | + tar -xvf linux-include.tar.gz + - name: Build the rest of ChimeraX + run: | + MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs install + MAKEOPTS="-j$(nproc)" NO_PREBUILT=1 PYQT_LICENSE=commercial make -j$(nproc) -C prereqs app-install + make -C src/apps/ChimeraX install BUILD_TYPE=daily + ChimeraX.app/bin/python3.11 -m pip install wheels/*.whl + cp -rp include ChimeraX.app + make -C src/apps install BUILD_TYPE=daily + make -C docs install BUILD_TYPE=daily - name: Run the legacy test suite run: make test - name: Install Pytest @@ -65,7 +86,7 @@ jobs: run: USE_COVERAGE=1 make pytest-app - name: Report coverage run: make report-coverage - - name: Build the Rocky 9 package + - name: Make the package run: make -f Makefile.centos ${{ inputs.release_type }}-package - run: mv rpmbuild/RPMS/x86_64/ucsf-chimerax*.rpm ./chimerax.rpm - name: Upload ChimeraX @@ -76,19 +97,3 @@ jobs: release_type: ${{ inputs.release_type }} platform: centos-9 deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Upload documentation - uses: ./utils/ci/upload_docs - with: - deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }} - - name: Tar bundles and includes for other builds - run: | - export BUNDLE_REPO_DIR=$(git rev-parse --show-toplevel)/build/sync - tar -cvzf linux-bundles.tar.gz -C $BUNDLE_REPO_DIR . - tar -cvzf linux-include.tar.gz -C build include - - name: Cache the bundles and includes - uses: actions/cache/save@v4 - with: - path: | - linux-bundles.tar.gz - linux-include.tar.gz - key: linux-bundles-${{ inputs.release_type }}-${{ github.sha }} diff --git a/.github/workflows/ubuntu_build.yml b/.github/workflows/ubuntu_build.yml index c37fb1e51..b27746d48 100644 --- a/.github/workflows/ubuntu_build.yml +++ b/.github/workflows/ubuntu_build.yml @@ -16,7 +16,7 @@ jobs: build-ubuntu: strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04] + os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] env: PYOPENGL_PLATFORM: egl runs-on: ${{ matrix.os }}