Skip to content

Commit fd0c9a3

Browse files
authored
Merge pull request #387 from ecmwf/feature/update_ci
update ubuntu version in ci to latest
2 parents cc2e11b + 4c5b379 commit fd0c9a3

File tree

1 file changed

+15
-51
lines changed

1 file changed

+15
-51
lines changed

.github/workflows/ci.yaml

+15-51
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
qa:
1919
name: qa
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-24.04
2121
steps:
2222
- name: Checkout Repository
2323
uses: actions/checkout@v3
@@ -42,66 +42,29 @@ jobs:
4242

4343
- name: Check flake8
4444
run: flake8 .
45-
setup:
46-
name: setup
47-
runs-on: ubuntu-20.04
48-
outputs:
49-
matrix: ${{ steps.set-matrix.outputs.matrix }}
50-
inputs: ${{ steps.prepare-inputs.outputs.inputs }}
51-
inputs-for-ubuntu: ${{ steps.prepare-inputs.outputs.inputs-for-ubuntu }}
52-
steps:
53-
- name: Set Matrix
54-
id: set-matrix
55-
shell: bash -eux {0}
56-
run: |
57-
MATRIX=$(cat << 'EOS'
58-
name:
59-
60-
61-
include:
62-
63-
os: ubuntu-22.04
64-
compiler: gnu-11
65-
compiler_cc: gcc-11
66-
compiler_cxx: g++-11
67-
compiler_fc: gfortran-11
68-
69-
os: ubuntu-22.04
70-
compiler: clang-14
71-
compiler_cc: clang-14
72-
compiler_cxx: clang++-14
73-
compiler_fc: gfortran-11
74-
# Xcode compiler requires empty environment variables, so we pass null (~) here
75-
EOS
76-
)
77-
SKIP_MATRIX_JOBS=$(cat << 'EOS'
78-
${{ inputs.skip_matrix_jobs }}
79-
EOS
80-
)
81-
SELECT_NAME_COND="1 != 1"
82-
SELECT_INCLUDE_COND="1 != 1"
83-
for skip_job in $SKIP_MATRIX_JOBS; do SELECT_NAME_COND="$SELECT_NAME_COND or . == \"$skip_job\""; SELECT_INCLUDE_COND="$SELECT_INCLUDE_COND or .name == \"$skip_job\""; done
84-
echo matrix=$(echo "$MATRIX" | yq eval "del(.name[] | select($SELECT_NAME_COND)) | del(.include[] | select($SELECT_INCLUDE_COND))" --output-format json --indent 0 -) >> $GITHUB_OUTPUT
85-
- name: Prepare build-package Inputs
86-
id: prepare-inputs
87-
shell: bash -eux {0}
88-
run: |
89-
echo inputs=$(echo "${{ inputs.build_package_inputs || '{}' }}" | yq eval '.' --output-format json --indent 0 -) >> $GITHUB_OUTPUT
90-
echo inputs-for-ubuntu=$(echo "${{ inputs.build_package_inputs || '{}' }}" | yq eval '. * {"os":"ubuntu-20.04","compiler":"gnu-10","compiler_cc":"gcc-10","compiler_cxx":"g++-10","compiler_fc":"gfortran-10"}' --output-format json --indent 0 -) >> $GITHUB_OUTPUT
9145
test:
9246
name: test
9347
needs:
9448
- qa
95-
- setup
9649
strategy:
9750
fail-fast: false
98-
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
51+
matrix:
52+
name:
53+
- ubuntu-22.04
54+
- macos-latest
55+
include:
56+
- name: ubuntu-22.04
57+
os: ubuntu-22.04
58+
compiler_fc: gfortran
59+
- name: macos-latest
60+
os: macos-latest
61+
compiler_fc: gfortran-12
9962
runs-on: ${{ matrix.os }}
10063
steps:
10164
- uses: actions/checkout@v4
10265
- name: Install eccodes and Dependencies
10366
id: install-dependencies
104-
uses: ecmwf-actions/build-package@v2
67+
uses: ecmwf/build-package@v2
10568
with:
10669
self_build: false
10770
dependencies: |
@@ -117,6 +80,7 @@ jobs:
11780
- name: Install Python Dependencies
11881
run: |
11982
python -m pip install --upgrade pip
83+
python -m pip install --upgrade setuptools
12084
python -m pip install pytest pytest-cov
12185
python -m pip install -r requirements.txt
12286
python -m pip install -r ./tests/requirements_test.txt
@@ -142,7 +106,7 @@ jobs:
142106
needs: test
143107
if: ${{ github.event_name == 'release' }}
144108
name: Upload to Pypi
145-
runs-on: ubuntu-latest
109+
runs-on: ubuntu-24.04
146110
steps:
147111
- uses: actions/checkout@v3
148112
- name: Set up Python

0 commit comments

Comments
 (0)