Skip to content

Commit

Permalink
Support two macOS GitHub Actions runner images
Browse files Browse the repository at this point in the history
- Fix GitHub Actions compilation on MinGW
- Update Linux and macOS GitHub Actions runner images
  • Loading branch information
encelo committed Mar 10, 2024
1 parent 6144b22 commit 25b475b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
ARCH: [armeabi-v7a, arm64-v8a, x86_64]
BuildType: [Debug, Release]

runs-on: 'ubuntu-20.04'
runs-on: 'ubuntu-22.04'

steps:
- name: 'Checkout Code'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Expand Up @@ -10,7 +10,7 @@ on: [push, workflow_dispatch]
jobs:
analyze:
name: 'Analyze'
runs-on: 'ubuntu-20.04'
runs-on: 'ubuntu-22.04'

strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/emscripten.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
BuildType: [Debug, Release, BinDist]

runs-on: 'ubuntu-20.04'
runs-on: 'ubuntu-22.04'

steps:
- name: 'Checkout Code'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Expand Up @@ -42,7 +42,7 @@ jobs:
CC: clang
CXX: clang++

runs-on: 'ubuntu-20.04'
runs-on: 'ubuntu-22.04'

steps:
- name: 'Checkout Code'
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/macos.yml
Expand Up @@ -18,8 +18,9 @@ jobs:
fail-fast: false
matrix:
BuildType: [Debug, Release, BinDist]
os: [macOS-12, macOS-14]

runs-on: 'macOS-11'
runs-on: ${{ matrix.os }}

steps:
- name: 'Checkout Code'
Expand All @@ -32,7 +33,11 @@ jobs:
- name: 'Download nCine-libraries, nCine Artifacts, and project data'
run: |
export OS=darwin
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
export OS=macos14
else
export OS=macos12
fi
export CC=appleclang
export BRANCH_NAME=$(git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD)
Expand Down Expand Up @@ -101,11 +106,14 @@ jobs:
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
export BRANCH_NAME=$(git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD)
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
export DEPLOY_MESSAGE=`sed 's/PROJECT_NAME/'"$PROJECT_NAME"'/' <<< "$DEPLOY_MESSAGE"`
export DEPLOY_MESSAGE=`sed 's/BRANCH_NAME/'"$BRANCH_NAME"'/' <<< "$DEPLOY_MESSAGE"`
export OS=darwin
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
export OS=macos14
else
export OS=macos12
fi
export CC=appleclang
export PROJECT_EXT=dmg
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/mingw.yml
Expand Up @@ -59,10 +59,10 @@ jobs:
run: |
$env:MSYSTEM = "MINGW64"
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 cmake'
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'
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-gcc' }
else { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-clang' }
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-gcc' }
else { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-clang' }
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Scc'
Expand Down Expand Up @@ -115,9 +115,9 @@ jobs:
$env:MSYSTEM = "MINGW64"
if ("${{ matrix.BuildType }}" -eq "BinDist")
{ C:\msys64\usr\bin\bash.exe -lc 'cmake -G \"MSYS Makefiles\" -B ../$PROJECT_NAME-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/lib/cmake/nCine' }
{ C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -B ../$env:PROJECT_NAME-build-${{ matrix.BuildType }} -D NCPROJECT_OPTIONS_PRESETS=${{ matrix.BuildType }} -D nCine_DIR=$(cygpath -m $PWD/../nCine/lib/cmake/nCine)" }
else
{ C:\msys64\usr\bin\bash.exe -lc 'cmake -G \"MSYS Makefiles\" -B ../$PROJECT_NAME-build-${{ matrix.BuildType }} -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine/lib/cmake/nCine' }
{ C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -B ../$env:PROJECT_NAME-build-${{ matrix.BuildType }} -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D nCine_DIR=$(cygpath -m $PWD/../nCine/lib/cmake/nCine)" }
- name: 'Make'
env:
Expand All @@ -134,7 +134,6 @@ jobs:
CHERE_INVOKING: on
run: |
$env:PROJECT_NAME = Split-Path -Path "$env:GITHUB_REPOSITORY" -leaf
$env:PATH = "C:\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
$env:MSYSTEM = "MINGW64"
C:\msys64\usr\bin\bash.exe -lc 'make package -C ../$PROJECT_NAME-build-${{ matrix.BuildType }}'
Expand Down

0 comments on commit 25b475b

Please sign in to comment.