Skip to content

Commit 40b7e7f

Browse files
authored
Update CI workflow (#1132)
* Update linux runner to ubuntu-22.04 Ubuntu 18.04 and 20.04 runner images have been deprecated and removed. References: https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/ * Update Python to 3.9 The pip installer (get-pip.py) requires Python 3.9 as the minimum supported version. See: https://raw.githubusercontent.com/pypa/get-pip/5b6af739d6c6547ab54e799349434f2fc9d95846/public/get-pip.py * Update actions/checkout to v4 * Remove MacOS from job matrix * Consolidate Windows runners to windows-2022 Remove windows-latest and windows-2016 entries. MSVC 14.16 toolset is no longer available on windows runners. See: actions/runner-images#12764 * Update ubuntu-22.04 compiler versions to oldest available Replace gcc-6 and clang-3.9 with gcc-9 and clang-11 (oldest versions available in ubuntu-22.04). The ubuntu-18.04 GitHub runner image has been deprecated and removed, replaced by ubuntu-22.04. See: https://packages.ubuntu.com/jammy/gcc https://packages.ubuntu.com/jammy/clang * Remove all macOS references from CI * Add github-actions-update branch to CI push triggers * Add artifact upload to CI workflow * Remove OS prefix from job titles * Disable ubuntu-latest builds due to compiler compatibility issues * Remove github-actions-update from branches built on push
1 parent 735928e commit 40b7e7f

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,49 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
- os: ubuntu-latest
17+
# - os: ubuntu-latest
18+
# os_short: linux
19+
# compiler_cc: gcc
20+
# compiler_cxx: g++
21+
# - os: ubuntu-latest
22+
# os_short: linux
23+
# compiler_cc: clang
24+
# compiler_cxx: clang++
25+
- os: ubuntu-22.04
1826
os_short: linux
19-
compiler_cc: gcc
20-
compiler_cxx: g++
21-
- os: ubuntu-latest
27+
compiler_cc: clang-11
28+
compiler_cxx: clang++-11
29+
- os: ubuntu-22.04
2230
os_short: linux
23-
compiler_cc: clang
24-
compiler_cxx: clang++
25-
- os: ubuntu-18.04
26-
os_short: linux
27-
compiler_cc: clang-3.9
28-
compiler_cxx: clang++-3.9
29-
- os: ubuntu-18.04
30-
os_short: linux
31-
compiler_cc: gcc-6
32-
compiler_cxx: g++-6
33-
compiler_install: 'g++6 g++-6-multilib'
34-
- os: windows-latest
31+
compiler_cc: gcc-9
32+
compiler_cxx: g++-9
33+
compiler_install: 'gcc-9-multilib g++-9-multilib'
34+
- os: windows-2022
3535
os_short: windows
3636
compiler_cc: msvc
37-
- os: windows-2016
38-
os_short: windows
39-
compiler_cc: msvc++14.16-vs2017-cl
40-
# MacOS 32 Bins seem not supported
41-
# - os: macos-latest
42-
# os_short: mac
43-
# compiler_cc: clang
44-
# compiler_cxx: clang++
4537
fail-fast: false
4638
runs-on: ${{ matrix.os }}
47-
name: ${{ matrix.os_short }}-${{ matrix.os }}-${{ matrix.compiler_cc }}
39+
name: ${{ matrix.os_short }}-${{ matrix.compiler_cc }}
4840
env:
4941
DEPENDENCIES_FOLDER: dependencies
5042
DEPENDENCIES_ROOT: ${{ github.workspace }}/dependencies
5143
DEPENDENCIES_ROOT_WIN: ${{ github.workspace }}\dependencies
5244
steps:
53-
- uses: actions/checkout@v2
45+
- uses: actions/checkout@v4
5446
with:
5547
submodules: recursive
5648
path: amxmodx
5749
# Setup Python for AMBuild
5850
- uses: actions/setup-python@v2
59-
name: Setup Python 3.8
51+
name: Setup Python 3.9
6052
with:
61-
python-version: 3.8
53+
python-version: 3.9
6254
- name: Install Python dependencies
6355
run: |
6456
python3 -m pip install --upgrade pip setuptools wheel
6557
python3 --version
6658
- name: Install AMXModX dependencies (Linux)
67-
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
59+
if: startsWith(runner.os, 'Linux')
6860
shell: bash
6961
run: |
7062
mkdir -p ${{ env.DEPENDENCIES_FOLDER }}
@@ -113,14 +105,21 @@ jobs:
113105
${{ matrix.compiler_cc }} --version
114106
${{ matrix.compiler_cxx }} --version
115107
- uses: ilammy/setup-nasm@v1
116-
- name: Build Linux/macOS
117-
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
108+
- name: Build Linux
109+
if: startsWith(runner.os, 'Linux')
118110
working-directory: amxmodx
119111
run: |
120112
mkdir build
121113
cd build
122114
python3 ../configure.py --enable-optimize --metamod=${{ env.DEPENDENCIES_ROOT }}/metamod-am --hlsdk=${{ env.DEPENDENCIES_ROOT }}/hlsdk --mysql=${{ env.DEPENDENCIES_ROOT }}/mysql-5.5
123115
ambuild
116+
- name: Upload Linux artifacts
117+
if: startsWith(runner.os, 'Linux') && always()
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: amxmodx-${{ matrix.os_short }}-${{ matrix.compiler_cc }}-${{ github.sha }}
121+
path: amxmodx/build/packages/
122+
retention-days: 7
124123
- uses: ilammy/msvc-dev-cmd@v1
125124
with:
126125
arch: x86
@@ -134,4 +133,10 @@ jobs:
134133
cd build
135134
python3 ../configure.py --enable-optimize --metamod=${{ env.DEPENDENCIES_ROOT_WIN }}\metamod-am --hlsdk=${{ env.DEPENDENCIES_ROOT_WIN }}\hlsdk --mysql=${{ env.DEPENDENCIES_ROOT_WIN }}\mysql-5.5
136135
ambuild
137-
136+
- name: Upload Windows artifacts
137+
if: startsWith(runner.os, 'Windows') && always()
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: amxmodx-${{ matrix.os_short }}-${{ matrix.compiler_cc }}-${{ github.sha }}
141+
path: amxmodx/build/packages/
142+
retention-days: 7

0 commit comments

Comments
 (0)