diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 51b7f70d..d031d539 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -43,6 +43,12 @@ jobs: - os: windows-2019 # always use the oldest possible for 32-bit because of older compilers, and better support of certain legacy OSes targetos: win32 targetarch: i386 + - os: macos-14 # in GitHub documentation, it's an ARM64 machine + targetos: apple + targetarch: arm64 + - os: macos-12 # in GitHub documentation, it's an x86 machine + targetos: apple + targetarch: amd64 env: SDL_VERSION: 2.30.3 GH_CPU_ARCH: ${{ matrix.targetarch }} diff --git a/scripts/gha/build_apple.sh b/scripts/gha/build_apple.sh new file mode 100755 index 00000000..9ec7ba04 --- /dev/null +++ b/scripts/gha/build_apple.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +. scripts/lib.sh + +cd $GITHUB_WORKSPACE || die + +pushd hlsdk || die +./waf configure build install --destdir=../bin || die +popd + +./waf configure --enable-utils --enable-tests --enable-lto build install --destdir=bin || die_configure + +mkdir -p artifacts/ +tar -cJvf artifacts/ash3d-fwgs-apple-$ARCH.tar.xz -C bin . # skip the bin directory from resulting tar archive diff --git a/scripts/gha/deps_apple.sh b/scripts/gha/deps_apple.sh new file mode 100755 index 00000000..30efcfa4 --- /dev/null +++ b/scripts/gha/deps_apple.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +cd $GITHUB_WORKSPACE + +wget http://libsdl.org/release/SDL2-$SDL_VERSION.dmg -O SDL2.dmg +hdiutil mount SDL2.dmg +sudo cp -vr /Volumes/SDL2/SDL2.framework /Library/Frameworks + +git clone https://github.com/FWGS/hlsdk-portable hlsdk --depth=1