Skip to content

Commit 0b5ef87

Browse files
committed
Support two macOS GitHub Actions runner images
- Fix GitHub Actions compilation on MinGW - Rename a filesystem function to fix compilation on Linux - Update Linux and macOS GitHub Actions runner images
1 parent a8740ba commit 0b5ef87

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
ARCH: [armeabi-v7a, arm64-v8a, x86_64]
1919
BuildType: [Debug, Release]
2020

21-
runs-on: 'ubuntu-20.04'
21+
runs-on: 'ubuntu-22.04'
2222

2323
steps:
2424
- name: 'Checkout Code'

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on: [push, workflow_dispatch]
99
jobs:
1010
analyze:
1111
name: 'Analyze'
12-
runs-on: 'ubuntu-20.04'
12+
runs-on: 'ubuntu-22.04'
1313

1414
strategy:
1515
fail-fast: false

.github/workflows/emscripten.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
BuildType: [Debug, Release, BinDist]
2020

21-
runs-on: 'ubuntu-20.04'
21+
runs-on: 'ubuntu-22.04'
2222

2323
steps:
2424
- name: 'Checkout Code'

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
CC: clang
4242
CXX: clang++
4343

44-
runs-on: 'ubuntu-20.04'
44+
runs-on: 'ubuntu-22.04'
4545

4646
steps:
4747
- name: 'Checkout Code'

.github/workflows/macos.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
BuildType: [Debug, Release, BinDist]
20+
os: [macOS-12, macOS-14]
2021

21-
runs-on: 'macOS-11'
22+
runs-on: ${{ matrix.os }}
2223

2324
steps:
2425
- name: 'Checkout Code'
@@ -31,7 +32,11 @@ jobs:
3132
3233
- name: 'Download nCine-libraries and project data'
3334
run: |
34-
export OS=darwin
35+
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
36+
export OS=macos14
37+
else
38+
export OS=macos12
39+
fi
3540
export CC=appleclang
3641
3742
export LIBRARIES_BRANCH=`echo $LIBRARIES_BRANCH | sed 's/OS/'"$OS"'/'`
@@ -107,7 +112,11 @@ jobs:
107112
export DEPLOY_MESSAGE=`sed 's/PROJECT_NAME/'"$PROJECT_NAME"'/' <<< "$DEPLOY_MESSAGE"`
108113
export DEPLOY_MESSAGE=`sed 's/BRANCH_NAME/'"$BRANCH_NAME"'/' <<< "$DEPLOY_MESSAGE"`
109114
110-
export OS=darwin
115+
if [[ "${{ matrix.os }}" == "macOS-14" ]]; then
116+
export OS=macos14
117+
else
118+
export OS=macos12
119+
fi
111120
export CC=appleclang
112121
export PROJECT_EXT=dmg
113122

.github/workflows/mingw.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: |
5959
$env:MSYSTEM = "MINGW64"
6060
61-
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'
61+
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'
6262
6363
if ("${{ matrix.CC }}" -eq "gcc") { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-gcc' }
6464
else { C:\msys64\usr\bin\bash -lc 'pacman --needed --noconfirm -S mingw-w64-x86_64-clang' }
@@ -106,12 +106,12 @@ jobs:
106106
cd ../nCine
107107
if ("${{ matrix.BuildType }}" -eq "BinDist")
108108
{
109-
C:\msys64\usr\bin\bash.exe -lc 'cmake -G \"MSYS Makefiles\" -B ../nCine-build-Release -D CMAKE_BUILD_TYPE=Release -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF'
109+
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -B ../nCine-build-Release -D CMAKE_BUILD_TYPE=Release -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF"
110110
C:\msys64\usr\bin\bash.exe -lc 'make -j2 -C ../nCine-build-Release'
111111
}
112112
else
113113
{
114-
C:\msys64\usr\bin\bash.exe -lc 'cmake -G \"MSYS Makefiles\" -B ../nCine-build-${{ matrix.BuildType }} -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF'
114+
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -B ../nCine-build-${{ matrix.BuildType }} -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_DYNAMIC_LIBRARY=OFF -D IMGUI_VERSION_TAG=docking -D NCINE_PREFERRED_BACKEND=SDL2 -D NCINE_WITH_THREADS=OFF -D NCINE_WITH_WEBP=OFF -D NCINE_WITH_AUDIO=OFF -D NCINE_WITH_SCRIPTING_API=OFF -D NCINE_BUILD_TESTS=OFF"
115115
C:\msys64\usr\bin\bash.exe -lc 'make -j2 -C ../nCine-build-${{ matrix.BuildType }}'
116116
}
117117
@@ -126,9 +126,9 @@ jobs:
126126
$env:MSYSTEM = "MINGW64"
127127
128128
if ("${{ matrix.BuildType }}" -eq "BinDist")
129-
{ 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-build-Release' }
129+
{ 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-build-Release)" }
130130
else
131-
{ C:\msys64\usr\bin\bash.exe -lc 'cmake -G \"MSYS Makefiles\" -B ../$PROJECT_NAME-build-${{ matrix.BuildType }} -D nCine_DIR=$(pwd)/../nCine-build-${{ matrix.BuildType }}' }
131+
{ 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-build-${{ matrix.BuildType }})" }
132132
133133
- name: 'Make'
134134
env:

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void MyEventHandler::onPreInit(nc::AppConfiguration &config)
8989
if (nc::fs::isReadableFile(ui::auxString.data()) == false)
9090
ui::auxString = "asset::config.lua";
9191
#elif defined(__linux__) && defined(NCPROJECT_DATA_DIR_DIST)
92-
ui::auxString = nc::fs::joinPath(nc::fs::homeDir(), linuxConfigDir);
92+
ui::auxString = nc::fs::joinPath(nc::fs::homePath(), linuxConfigDir);
9393
if (nc::fs::exists(ui::auxString.data()) == false)
9494
{
9595
const bool dirCreated = nc::fs::createDir(ui::auxString.data());
@@ -154,7 +154,7 @@ void MyEventHandler::onInit()
154154
{
155155
#if defined(__linux__) && defined(NCPROJECT_DATA_DIR_DIST)
156156
static char iniFilename[512];
157-
strncpy(iniFilename, nc::fs::joinPath(nc::fs::joinPath(nc::fs::homeDir(), linuxConfigDir), "imgui.ini").data(), 512);
157+
strncpy(iniFilename, nc::fs::joinPath(nc::fs::joinPath(nc::fs::homePath(), linuxConfigDir), "imgui.ini").data(), 512);
158158
ImGui::GetIO().IniFilename = iniFilename;
159159
#endif
160160

0 commit comments

Comments
 (0)