Skip to content

Commit 7ff7324

Browse files
committed
Update the GitHub Actions workflow files
- Remove the deprecated Windows Server 2019 runner image - Update the Linux runner images to Ubuntu 24.04 - Update the macOS runner image to macOS 15 - Query the number of available logical cores when building in parallel - Install make and patch when compiling on MSYS2
1 parent da9df50 commit 7ff7324

7 files changed

Lines changed: 28 additions & 47 deletions

File tree

.github/workflows/android.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ARCH: [armeabi-v7a, arm64-v8a, x86_64]
2020
BuildType: [Debug, Release]
2121

22-
runs-on: 'ubuntu-22.04'
22+
runs-on: 'ubuntu-24.04'
2323

2424
steps:
2525
- name: 'Checkout Code'
@@ -75,8 +75,10 @@ jobs:
7575
run: |
7676
export JAVA_HOME=$JAVA_HOME_17_X64
7777
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
78+
export MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)"
79+
7880
cd ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android
79-
gradle assemble${{ matrix.BuildType }}
81+
gradle assemble${{ matrix.BuildType }} --parallel
8082
8183
- name: 'Push Artifacts'
8284
env:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ on: [push, workflow_dispatch]
1010
jobs:
1111
analyze:
1212
name: 'Analyze'
13-
runs-on: 'ubuntu-22.04'
13+
runs-on: 'ubuntu-24.04'
1414

1515
strategy:
1616
fail-fast: false
17-
matrix:
18-
language: [ 'cpp' ]
1917

2018
steps:
2119
- name: 'Checkout Repository'
@@ -24,7 +22,7 @@ jobs:
2422
- name: 'Initialize CodeQL'
2523
uses: github/codeql-action/init@v1
2624
with:
27-
languages: ${{ matrix.language }}
25+
languages: 'cpp'
2826

2927
- run: |
3028
# Download nCine-libraries, nCine Artifacts, and project data
@@ -71,7 +69,7 @@ jobs:
7169
cmake -B ../$PROJECT_NAME-build-$BuildType -D CMAKE_BUILD_TYPE=$BuildType -D nCine_DIR=$NCINE_DIRECTORY
7270
7371
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/../nCine-external/lib
74-
make -j2 -C ../$PROJECT_NAME-build-$BuildType
72+
make -j $(getconf _NPROCESSORS_ONLN) -C ../$PROJECT_NAME-build-$BuildType
7573
7674
- name: 'Perform CodeQL Analysis'
7775
uses: github/codeql-action/analyze@v1

.github/workflows/emscripten.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
BuildType: [Debug, Release, BinDist]
2121

22-
runs-on: 'ubuntu-22.04'
22+
runs-on: 'ubuntu-24.04'
2323

2424
steps:
2525
- name: 'Checkout Code'
@@ -92,7 +92,7 @@ jobs:
9292
- name: 'Make'
9393
run: |
9494
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
95-
make -j2 -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
95+
make -j $(getconf _NPROCESSORS_ONLN) -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
9696
9797
- name: 'Package'
9898
if: matrix.BuildType == 'BinDist'

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
CC: clang
4343
CXX: clang++
4444

45-
runs-on: 'ubuntu-22.04'
45+
runs-on: 'ubuntu-24.04'
4646

4747
steps:
4848
- name: 'Checkout Code'
@@ -108,7 +108,7 @@ jobs:
108108
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
109109
110110
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/../nCine-external/lib
111-
make -j2 -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
111+
make -j $(getconf _NPROCESSORS_ONLN) -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
112112
113113
- name: 'Package'
114114
if: matrix.BuildType == 'BinDist'

.github/workflows/macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
BuildType: [Debug, Release, BinDist]
21-
os: [macOS-13, macOS-14]
21+
os: [macOS-13, macOS-15]
2222

2323
runs-on: ${{ matrix.os }}
2424

@@ -33,8 +33,8 @@ jobs:
3333
3434
- name: 'Download nCine-libraries, nCine Artifacts, and project data'
3535
run: |
36-
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
37-
export OS=macos14
36+
if [[ "${{ matrix.os }}" == "macOS-15" ]]; then
37+
export OS=macos15
3838
else
3939
export OS=macos13
4040
fi
@@ -88,7 +88,7 @@ jobs:
8888
- name: 'Make'
8989
run: |
9090
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
91-
make -j2 -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
91+
make -j $(getconf _NPROCESSORS_ONLN) -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}
9292
9393
- name: 'Package'
9494
if: matrix.BuildType == 'BinDist'
@@ -109,8 +109,8 @@ jobs:
109109
export DEPLOY_MESSAGE=`sed 's/PROJECT_NAME/'"$PROJECT_NAME"'/' <<< "$DEPLOY_MESSAGE"`
110110
export DEPLOY_MESSAGE=`sed 's/BRANCH_NAME/'"$BRANCH_NAME"'/' <<< "$DEPLOY_MESSAGE"`
111111
112-
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
113-
export OS=macos14
112+
if [[ "${{ matrix.os }}" == "macOS-15" ]]; then
113+
export OS=macos15
114114
else
115115
export OS=macos13
116116
fi

.github/workflows/mingw.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
CC: clang
4343
CXX: clang++
4444

45-
runs-on: 'windows-2019'
45+
runs-on: 'windows-2022'
4646

4747
steps:
4848
- name: 'Checkout Code'
@@ -59,7 +59,7 @@ jobs:
5959
run: |
6060
$env:MSYSTEM = "MINGW64"
6161
62-
C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-glew mingw-w64-x86_64-glfw mingw-w64-x86_64-SDL2 mingw-w64-x86_64-openal mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp mingw-w64-x86_64-lua mingw-w64-x86_64-cmake'
62+
C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-glew mingw-w64-x86_64-glfw mingw-w64-x86_64-SDL2 mingw-w64-x86_64-openal mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp mingw-w64-x86_64-lua mingw-w64-x86_64-cmake make patch'
6363
6464
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-gcc' }
6565
else { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-clang' }
@@ -126,7 +126,7 @@ jobs:
126126
$env:PROJECT_NAME = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
127127
$env:MSYSTEM = "MINGW64"
128128
129-
C:\msys64\usr\bin\bash.exe -lc 'make -j2 -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}'
129+
C:\msys64\usr\bin\bash.exe -lc 'make -j $NUMBER_OF_PROCESSORS -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}'
130130
131131
- name: 'Package'
132132
if: matrix.BuildType == 'BinDist'

.github/workflows/windows.yml

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [windows-2019, windows-2022]
2120
BuildType: [Debug, Release, BinDist]
2221

23-
runs-on: ${{ matrix.os }}
22+
runs-on: 'windows-2022'
2423

2524
steps:
2625
- name: 'Checkout Code'
@@ -37,17 +36,11 @@ jobs:
3736
$env:GIT_REDIRECT_STDERR = '2>&1'
3837
$env:branch_name = git describe --tags --exact-match; if (-not $?) { $env:branch_name = git symbolic-ref -q --short HEAD }; if (-not $?) { $env:branch_name = git rev-parse --short HEAD }
3938
40-
$env:vsversion = switch ("${{ matrix.os }}")
41-
{
42-
"windows-2022" {"vs2022"}
43-
"windows-2019" {"vs2019"}
44-
}
45-
4639
cd ..
4740
git clone https://github.com/nCine/nCine-libraries-artifacts.git
4841
cd nCine-libraries-artifacts
4942
50-
$env:LIBRARIES_BRANCH = $env:LIBRARIES_BRANCH -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
43+
$env:LIBRARIES_BRANCH = $env:LIBRARIES_BRANCH -creplace "OS","windows" -creplace "COMPILER","vs2022"
5144
git checkout $env:LIBRARIES_BRANCH
5245
$env:LIBRARIES_FILE = Get-ChildItem -Path $(pwd) -Name -File | Select-Object -First 1
5346
7z x $env:LIBRARIES_FILE
@@ -61,7 +54,7 @@ jobs:
6154
cd nCine-artifacts
6255
6356
$env:NCINE_SOURCE_BRANCH = $env:NCINE_SOURCE_BRANCH -creplace "BRANCH_NAME","$env:branch_name"
64-
$env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
57+
$env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","windows" -creplace "COMPILER","vs2022"
6558
git checkout $env:NCINE_BRANCH
6659
$env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter nCine-*.zip -Name -File | Select-Object -First 1
6760
7z x $env:NCINE_FILE
@@ -78,25 +71,19 @@ jobs:
7871
run: |
7972
$env:project_name = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
8073
81-
$env:generator = switch ("${{ matrix.os }}")
82-
{
83-
"windows-2022" {"Visual Studio 17 2022"}
84-
"windows-2019" {"Visual Studio 16 2019"}
85-
}
86-
8774
if ("${{ matrix.BuildType }}" -eq "BinDist")
88-
{ cmake -G "$env:generator" -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/cmake }
75+
{ cmake -G "Visual Studio 17 2022" -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/cmake }
8976
else
90-
{ cmake -G "$env:generator" -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/cmake }
77+
{ cmake -G "Visual Studio 17 2022" -A x64 -B ../$env:project_name-build-${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/cmake }
9178
9279
- name: 'CMake Build'
9380
run: |
9481
$env:project_name = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
9582
9683
if ("${{ matrix.BuildType }}" -eq "BinDist")
97-
{ cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config Release }
84+
{ cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config Release -j $env:NUMBER_OF_PROCESSORS }
9885
else
99-
{ cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config ${{ matrix.BuildType }} }
86+
{ cmake --build ../$env:project_name-build-${{ matrix.BuildType }} --config ${{ matrix.BuildType }} -j $env:NUMBER_OF_PROCESSORS }
10087
10188
- name: 'Package'
10289
if: matrix.BuildType == 'BinDist'
@@ -118,15 +105,9 @@ jobs:
118105
$env:DEPLOY_MESSAGE = $env:DEPLOY_MESSAGE -creplace "PROJECT_NAME",$env:project_name
119106
$env:DEPLOY_MESSAGE = $env:DEPLOY_MESSAGE -creplace "BRANCH_NAME",$env:branch_name
120107
121-
$env:vsversion = switch ("${{ matrix.os }}")
122-
{
123-
"windows-2022" {"vs2022"}
124-
"windows-2019" {"vs2019"}
125-
}
126-
127108
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "PROJECT_NAME",$env:project_name
128109
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "BRANCH_NAME",$env:branch_name
129-
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
110+
$env:DEPLOY_BRANCH = $env:DEPLOY_BRANCH -creplace "OS","windows" -creplace "COMPILER","vs2022"
130111
131112
cd ..
132113
git clone https://$env:PUBLIC_REPO_TOKEN@github.com/$env:GITHUB_REPOSITORY-artifacts.git 2>&1>$null

0 commit comments

Comments
 (0)