Skip to content

Commit 61469ed

Browse files
committed
Fix MacOS build and integrate into matrix
- add ld flags to avoid compilation error - adding MacOS section to general package build - added arm support to macos packaging script - improve download-paks to add assets into Mac package - remove redundant single workflow file for Mac
1 parent 9cfd161 commit 61469ed

File tree

4 files changed

+23
-42
lines changed

4 files changed

+23
-42
lines changed

.github/workflows/build-macos.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/build-packages.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,33 @@ jobs:
3838
3939
build:
4040

41-
runs-on: ubuntu-latest
4241
needs: set-version
43-
container: debian:oldstable-slim
42+
4443
strategy:
4544
fail-fast: false
4645
matrix:
4746
release:
4847
- file: release-linux-x86_64
49-
name: Linux64
48+
name: Linux-x64
49+
runs-on: ubuntu-latest
50+
container: debian:oldstable-slim
5051
- file: release-mingw32-x86_64
51-
name: Windows32
52+
name: Windows-x32
53+
runs-on: ubuntu-latest
54+
container: debian:oldstable-slim
5255
platform: mingw32
56+
- file: release-darwin-arm
57+
name: Mac-arm
58+
runs-on: macos-15
59+
ldflags: -ld64
5360

61+
runs-on: ${{ matrix.release.runs-on }}
62+
container:
63+
image: ${{ matrix.release.container }}
64+
5465
env:
5566
VERSION: ${{ needs.set-version.outputs.version }}
67+
LDFLAGS: ${{ matrix.release.ldflags }}
5668

5769
steps:
5870
- name: dependencies
@@ -71,6 +83,7 @@ jobs:
7183
curl \
7284
rsync \
7385
git
86+
if: ${{ ! contains(matrix.release.runs-on, 'macos') }}
7487
- uses: actions/checkout@v6
7588
## attempts for setting version via tag, but doesn't work for shallow copy:
7689
# with:

make-macosx-app.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if [ $# == 0 ] || [ $# -gt 2 ]; then
1313
echo "Optional architectures are:"
1414
echo " x86"
1515
echo " x86_64"
16+
echo " arm"
1617
echo
1718
exit 1
1819
fi
@@ -38,11 +39,14 @@ if [ "$2" != "" ]; then
3839
CURRENT_ARCH="x86"
3940
elif [ "$2" == "x86_64" ]; then
4041
CURRENT_ARCH="x86_64"
42+
elif [ "$2" == "arm" ]; then
43+
CURRENT_ARCH="arm"
4144
else
4245
echo "Invalid architecture: $2"
4346
echo "Valid architectures are:"
4447
echo " x86"
4548
echo " x86_64"
49+
echo " arm"
4650
echo
4751
exit 1
4852
fi

misc/download-paks.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ DATA_GRHUB="data-grhub-1.3.1.pk3"
2929
download "https://github.com/GrangerHub/tremulous-assets/releases/download/data-1.3.1/tremulous-grhub-1.3.1.pk3" \
3030
$DATA_GRHUB
3131

32-
if [[ $dir == "./build/release-darwin-x86_64" ]]; then
32+
if [[ $dir == *darwin* ]]; then
3333
subdir=./Tremulous.app/Contents/MacOS/gpp/
3434
else
3535
subdir=./gpp
3636
fi
3737

3838
echo "Extracting 1.1.0 data"
39+
mkdir -p $subdir
3940
unzip -jo -d $subdir ../$DATA_110 "*.pk3"
4041

4142
echo "Adding Grangerhub assets"

0 commit comments

Comments
 (0)