-
Notifications
You must be signed in to change notification settings - Fork 31
94 lines (93 loc) · 3.54 KB
/
ubuntu_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build ChimeraX for Ubuntu
on:
workflow_call:
inputs:
release_type:
type: string
required: true
branch:
type: string
required: false
secrets:
PREBUILT_CACHE_SECRET:
required: true
jobs:
build-ubuntu:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
env:
PYOPENGL_PLATFORM: egl
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || 'develop' }}
- run: sudo apt-get update && sudo apt-get upgrade -y && ${PWD}/utils/set_up_ubuntu.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: ${{ format('Build ChimeraX for Ubuntu ({0}, {1}) / build-ubuntu ({2})', inputs.branch, inputs.release_type, matrix.os) }}
- name: Note the run and job IDs on Plato
if: ${{ inputs.release_type == 'daily' }} || ${{ inputs.release_type == 'candidate' }}
uses: ./utils/ci/nightly_logs
with:
platform: ${{ matrix.os }}
deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }}
run_id: ${{ github.run_id }}
job_id: ${{ steps.get_job_id.outputs.job_id }}
build_type: ${{ inputs.release_type }}
- 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 tarball to wheels
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
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: Make the package
run: make -f Makefile.ubuntu ${{ inputs.release_type }}-package
- run: mv ${{ matrix.os }}/ucsf-chimerax-*.deb ./chimerax.deb
- name: Upload ChimeraX
uses: ./utils/ci/upload_artifact
with:
artifact_path: chimerax.deb
full_build: true
release_type: ${{ inputs.release_type }}
platform: ${{ matrix.os }}
deploy_key: ${{ secrets.PREBUILT_CACHE_SECRET }}