From 994c65df7b66aac03b145f92964475cbf58cf79b Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:49:04 +0800 Subject: [PATCH 01/13] add m1 matrix --- .github/workflows/nightlies.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index 0d8dba5..d0573a0 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -341,6 +341,10 @@ jobs: - target: os: windows builder: windows-2019 + - target: + os: macosx + triple: arm64-apple-m1 + builder: macos-14 env: ${{ matrix.setting.environment }} name: '${{ matrix.target.triple }} (${{ matrix.setting.branch }}, ${{ matrix.setting.commit }})' From e2419b02111f3ced5c1f2233200e05eb89df8805 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:53:52 +0800 Subject: [PATCH 02/13] fixes settings --- .github/workflows/nightlies.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index d0573a0..4e105d1 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -345,6 +345,7 @@ jobs: os: macosx triple: arm64-apple-m1 builder: macos-14 + setting: ${{ fromJson(needs.setup.outputs.settings) }} env: ${{ matrix.setting.environment }} name: '${{ matrix.target.triple }} (${{ matrix.setting.branch }}, ${{ matrix.setting.commit }})' From 4d72a6f94c1f1cb223e9be52bde1ca1bda97f854 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:04:15 +0800 Subject: [PATCH 03/13] fixes --- .github/workflows/nightlies.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index 4e105d1..41d8423 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -327,6 +327,8 @@ jobs: triple: armv7l-linux-musleabihf - os: macosx triple: x86_64-apple-darwin14 + - os: macosx_arm64 + triple: arm64-apple - os: windows triple: x86_64-w64-mingw32 - os: windows @@ -342,10 +344,8 @@ jobs: os: windows builder: windows-2019 - target: - os: macosx - triple: arm64-apple-m1 + os: macosx_arm64 builder: macos-14 - setting: ${{ fromJson(needs.setup.outputs.settings) }} env: ${{ matrix.setting.environment }} name: '${{ matrix.target.triple }} (${{ matrix.setting.branch }}, ${{ matrix.setting.commit }})' From 5471080d095387510e0f345fac4a413dd13244af Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:21:06 +0800 Subject: [PATCH 04/13] replace hub with gh --- bw-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index b9279ea..b533fd4 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -110,7 +110,7 @@ fragment assetFields on ReleaseAsset { getAssets=$getAssetsExact fi - resp=$(hub api --paginate graphql "${hubParams[@]}") || exit 1 + resp=$(gh api graphql --paginate "${hubParams[@]}") || exit 1 if [[ $(jq 'has("errors")' <<< "$resp") == true ]]; then jq -r '.errors[] | .message' <<< "$resp" >&2 From d302bc83b6a88114ab589213b9c81b2f1b7420ca Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:56:00 +0800 Subject: [PATCH 05/13] fixes installation of sqlite on m1 --- bw-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index b533fd4..d938c1f 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -165,7 +165,10 @@ for pkg in "$@"; do ;; 0) echo "Package $pkg not found for triple: $triple" - exit 1 + if [[ $triple != "arm64-apple" ]]; then + exit 1 + fi + ;; *) echo "Ambiguous triple '$triple'" >&2 From a09b2f34dc43ad74ee32e85a0a886c724284e1d5 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:22:25 +0800 Subject: [PATCH 06/13] Update bw-install.sh --- bw-install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bw-install.sh b/bw-install.sh index d938c1f..9d32d43 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -158,6 +158,10 @@ fi mkdir -p "$output" || exit 1 cd "$output" || exit 1 +if [[ $triple != "arm64-apple"]]; then + exit 0 +fi + for pkg in "$@"; do asset=$(getAsset "$pkg") || exit 1 case "$(jq 'length' <<< "$asset")" in @@ -165,9 +169,7 @@ for pkg in "$@"; do ;; 0) echo "Package $pkg not found for triple: $triple" - if [[ $triple != "arm64-apple" ]]; then - exit 1 - fi + exit 1 ;; *) From 184cee638ce18b7bb51ee4d03cc1bf3edd4e9b17 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:23:19 +0800 Subject: [PATCH 07/13] Update bw-install.sh --- bw-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index 9d32d43..3163e9b 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -158,7 +158,7 @@ fi mkdir -p "$output" || exit 1 cd "$output" || exit 1 -if [[ $triple != "arm64-apple"]]; then +if [[ $triple == "arm64-apple"]]; then exit 0 fi From 6a041aee43db98d8e172e03794a42b4ca30f0ccc Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:28:53 +0800 Subject: [PATCH 08/13] Update bw-install.sh --- bw-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index 3163e9b..4198692 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -158,7 +158,7 @@ fi mkdir -p "$output" || exit 1 cd "$output" || exit 1 -if [[ $triple == "arm64-apple"]]; then +if [[ $triple == "arm64-apple" ]]; then exit 0 fi From 48b8298d4b3b988da3ffce4915d1f1f618a4eb90 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:37:32 +0800 Subject: [PATCH 09/13] install deps --- bw-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bw-install.sh b/bw-install.sh index 4198692..08c61d6 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -159,6 +159,7 @@ mkdir -p "$output" || exit 1 cd "$output" || exit 1 if [[ $triple == "arm64-apple" ]]; then + brew install SQLite openssl@1.1 pcre exit 0 fi From 931d7de612527056faaf669fedaf616f1ab87e1b Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:48:14 +0800 Subject: [PATCH 10/13] Update deps.sh --- deps.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deps.sh b/deps.sh index c893247..29bca27 100755 --- a/deps.sh +++ b/deps.sh @@ -140,7 +140,11 @@ case "$(os)" in # Starting from musl 1.2.0, time_t is 64 bit on all arches echo "-d:nimUse64BitCTime" >> nim.cfg else - libdir=$(realpath lib) + if [[ $triple == "arm64-apple" ]]; then + libdir="/opt/homebrew/lib" + else + libdir=$(realpath lib) + fin cflags+=(-target "$triple") fi libs+=(libssl.a libcrypto.a libpcre.a libsqlite3.a) From efc66744e14ed22d706b5616ccb4a6edb6a7f542 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:51:21 +0800 Subject: [PATCH 11/13] Update deps.sh --- deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.sh b/deps.sh index 29bca27..2e4ef07 100755 --- a/deps.sh +++ b/deps.sh @@ -144,7 +144,7 @@ case "$(os)" in libdir="/opt/homebrew/lib" else libdir=$(realpath lib) - fin + fi cflags+=(-target "$triple") fi libs+=(libssl.a libcrypto.a libpcre.a libsqlite3.a) From b740887927b734e31203eaeab689b1232b514693 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:01:24 +0800 Subject: [PATCH 12/13] Update bw-install.sh --- bw-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index 08c61d6..3ad16b1 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -159,7 +159,7 @@ mkdir -p "$output" || exit 1 cd "$output" || exit 1 if [[ $triple == "arm64-apple" ]]; then - brew install SQLite openssl@1.1 pcre + brew install pcre exit 0 fi From 7f25a509d592dea9f94044a79a7b84849a83016f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:59:51 +0800 Subject: [PATCH 13/13] Update bw-install.sh --- bw-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bw-install.sh b/bw-install.sh index 3ad16b1..4198692 100755 --- a/bw-install.sh +++ b/bw-install.sh @@ -159,7 +159,6 @@ mkdir -p "$output" || exit 1 cd "$output" || exit 1 if [[ $triple == "arm64-apple" ]]; then - brew install pcre exit 0 fi