Skip to content

Commit d774274

Browse files
authored
Merge pull request #2907 to speed up the continuous integration workflows
This should reduce the CI runtime, by checking fewer things on an open pull request, especially on the MacOS runners which are busier and slower.
2 parents 0e48892 + 014b08d commit d774274

3 files changed

Lines changed: 45 additions & 16 deletions

File tree

.github/workflows/CI.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@
1212
# them. These 'answers' are re-generated daily, or on any push to main, and retrieved whenever
1313
# a push is made to a non-main branch. The new proposed changes are referred to as "Dynamic".
1414
#
15-
#
16-
# Changelog:
17-
# 2023-04 - Jackson Burns - Added this header, regression tests, cleanup of action in
18-
# in general, and documentation throughout the file.
19-
# 2023-05 - added Docker build steps
20-
# 2023-05-12 - added changes to allow running on forks
21-
# 2023-06-06 - added matrix build for libstdcxx-ng versions 12 and 13 on ubuntu. Only expect 12 to work.
22-
# 2023-06-07 - updated regression testing. Now fails if significant changes are detected.
23-
# 2023-06-15 - revert changes from 06-06, both now work
24-
# 2023-06-27 - add option to run from RMG-database with GitHub resuable workflows
25-
# 2023-07-17 - made it pass by default
26-
# 2023-07-21 - upload the regression results summary as artifact (for use as a comment on PRs)
27-
# 2023-07-31 - removed option to run from RMG-database with GitHub resuable workflows
28-
# 2024-10-01 - deprecated Mambaforge with Miniforge3 for environment creation
2915

3016
name: Continuous Integration
3117

@@ -68,6 +54,21 @@ jobs:
6854
python-version: ["3.9", "3.10", "3.11"]
6955
os: [macos-15-intel, macos-latest, ubuntu-latest]
7056
include-rms: ["", "with RMS"]
57+
exclude:
58+
# on macos, only check with RMS (assume it also works without RMS)
59+
- os: macos-15-intel
60+
include-rms: ""
61+
- os: macos-latest
62+
include-rms: ""
63+
# on macos, only test with latest Python version
64+
- os: macos-15-intel
65+
python-version: "3.9"
66+
- os: macos-latest
67+
python-version: "3.9"
68+
- os: macos-15-intel
69+
python-version: "3.10"
70+
- os: macos-latest
71+
python-version: "3.10"
7172
runs-on: ${{ matrix.os }}
7273
name: Python ${{ matrix.python-version }} ${{ matrix.os }} Build and Test ${{ matrix.include-rms }}
7374
# skip scheduled runs from forks
@@ -123,8 +124,14 @@ jobs:
123124

124125
# non-regression testing
125126
- name: Run Unit, Functional, and Database Tests
127+
if: matrix.os == 'ubuntu-latest'
126128
run: make test-all
127129

130+
# for the less capable non-linux runners, we only run units tests
131+
- name: Run Unit Tests
132+
if: matrix.os != 'ubuntu-latest'
133+
run: make test-unittests
134+
128135
regression-test:
129136
runs-on: ubuntu-latest
130137
name: Regression Test

.github/workflows/conda_build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@ jobs:
1818
os: [ubuntu-latest, macos-15-intel, macos-latest]
1919
numpy-version: ["1.26"]
2020
python-version: ["3.9", "3.10", "3.11"]
21+
is_pr: ["${{ contains(github.event_name, 'pull_request') }}"]
22+
exclude:
23+
# for PRs just run a single build per platform to save time and resources
24+
- is_pr: true
25+
os: ubuntu-latest
26+
python-version: "3.9"
27+
- is_pr: true
28+
os: ubuntu-latest
29+
python-version: "3.10"
30+
- is_pr: true
31+
os: macos-15-intel
32+
python-version: "3.9"
33+
- is_pr: true
34+
os: macos-15-intel
35+
python-version: "3.10"
36+
- is_pr: true
37+
os: macos-latest
38+
python-version: "3.9"
39+
- is_pr: true
40+
os: macos-latest
41+
python-version: "3.10"
2142
runs-on: ${{ matrix.os }}
2243
name: Build ${{ matrix.os }} Python ${{ matrix.python-version }} Numpy ${{ matrix.numpy-version }}
2344
defaults:

.github/workflows/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
schedule:
99
# * is a special character in YAML so you have to quote this string
10+
# weekly: runs at 8am UTC on Mondays
1011
- cron: "0 8 * * 1"
1112

1213
jobs:
@@ -26,13 +27,13 @@ jobs:
2627
with:
2728
fetch-depth: 0
2829

29-
- name: Setup Miniforge Python 3.9
30+
- name: Setup Miniforge Python 3.11
3031
uses: conda-incubator/setup-miniconda@v3
3132
with:
3233
environment-file: environment.yml
3334
miniforge-variant: Miniforge3
3435
miniforge-version: latest
35-
python-version: "3.9"
36+
python-version: "3.11"
3637
activate-environment: rmg_env
3738
auto-update-conda: true
3839
show-channel-urls: true

0 commit comments

Comments
 (0)