From bc4ff8c6b295daa594afd613a96ec45307732a11 Mon Sep 17 00:00:00 2001 From: Carl-Y <52552476+HH45137@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:17:36 +0800 Subject: [PATCH 1/5] Add apple silicon runner --- .github/workflows/build.yml | 9 +++++++++ scripts/build-macos-arm64.sh | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100755 scripts/build-macos-arm64.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c11a8e2..af581e93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,3 +109,12 @@ jobs: - name: Build dedicated macos-amd64 run: | scripts/build-macos-amd64.sh -d + + build-macos-arm64: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Build macos-arm64 + run: | + scripts/build-macos-arm64.sh \ No newline at end of file diff --git a/scripts/build-macos-arm64.sh b/scripts/build-macos-arm64.sh new file mode 100755 index 00000000..91f46f4f --- /dev/null +++ b/scripts/build-macos-arm64.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +git submodule init && git submodule update + +brew install sdl2 + +./waf configure -T debug --disable-warns $* && +./waf build From 23233bd4c9ed1ad21bc692297f32d433ee51aa38 Mon Sep 17 00:00:00 2001 From: Carl-Y <52552476+HH45137@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:27:53 +0800 Subject: [PATCH 2/5] Add apple silicon test --- .github/workflows/tests.yml | 9 +++++++++ scripts/tests-macos-arm64.sh | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100755 scripts/tests-macos-arm64.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 407239c4..c1cf2ffc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,15 @@ jobs: run: | scripts/tests-macos-amd64.sh + tests-macos-arm64: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Run tests macos-arm64 + run: | + scripts/tests-macos-arm64.sh + tests-windows-i386: runs-on: windows-2019 diff --git a/scripts/tests-macos-arm64.sh b/scripts/tests-macos-arm64.sh new file mode 100755 index 00000000..2befa2d2 --- /dev/null +++ b/scripts/tests-macos-arm64.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +git submodule init && git submodule update +./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* && +./waf install && +cd out && +DYLD_LIBRARY_PATH=bin/ ./unittest || exit 1 From d4e49f45b4adf7593f8ddb873971e7de9708e9fb Mon Sep 17 00:00:00 2001 From: Carl-Y <52552476+HH45137@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:30:06 +0800 Subject: [PATCH 3/5] fix to macos-14 --- .github/workflows/build.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af581e93..53aaa433 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,7 +111,7 @@ jobs: scripts/build-macos-amd64.sh -d build-macos-arm64: - runs-on: macos-latest + runs-on: macos-14 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1cf2ffc..ef2f4719 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,7 @@ jobs: scripts/tests-macos-amd64.sh tests-macos-arm64: - runs-on: macos-latest + runs-on: macos-14 steps: - uses: actions/checkout@v2 From 56eb412dbc844b78c0ad4bf73b0b1e397ab5c1ba Mon Sep 17 00:00:00 2001 From: Carl-Y <52552476+HH45137@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:38:56 +0800 Subject: [PATCH 4/5] Append python3 --- scripts/build-macos-arm64.sh | 4 ++-- scripts/tests-macos-arm64.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build-macos-arm64.sh b/scripts/build-macos-arm64.sh index 91f46f4f..abb6a2a8 100755 --- a/scripts/build-macos-arm64.sh +++ b/scripts/build-macos-arm64.sh @@ -2,7 +2,7 @@ git submodule init && git submodule update -brew install sdl2 +brew install sdl2 freetype2 fontconfig pkg-config opus libpng libedit -./waf configure -T debug --disable-warns $* && +python3 ./waf configure -T debug --disable-warns $* && ./waf build diff --git a/scripts/tests-macos-arm64.sh b/scripts/tests-macos-arm64.sh index 2befa2d2..ade3f27f 100755 --- a/scripts/tests-macos-arm64.sh +++ b/scripts/tests-macos-arm64.sh @@ -1,7 +1,7 @@ #!/bin/sh git submodule init && git submodule update -./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* && -./waf install && +python3 ./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* && +python3 ./waf install && cd out && DYLD_LIBRARY_PATH=bin/ ./unittest || exit 1 From 4ada22d3e90301bd8bd1980935ea4904c11a1555 Mon Sep 17 00:00:00 2001 From: Carl-Y <52552476+HH45137@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:40:58 +0800 Subject: [PATCH 5/5] Update build-macos-arm64.sh --- scripts/build-macos-arm64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-macos-arm64.sh b/scripts/build-macos-arm64.sh index abb6a2a8..80174a98 100755 --- a/scripts/build-macos-arm64.sh +++ b/scripts/build-macos-arm64.sh @@ -5,4 +5,4 @@ git submodule init && git submodule update brew install sdl2 freetype2 fontconfig pkg-config opus libpng libedit python3 ./waf configure -T debug --disable-warns $* && -./waf build +python3 ./waf build