diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 720d94e..c014eb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,27 +82,27 @@ jobs: with: name: bash-linux-${{matrix.arch}} path: releases/bash-linux-${{matrix.arch}} - # macos-universal: - # needs: - # - build - # runs-on: macos-latest - # steps: - # - uses: actions/download-artifact@v3 - # with: - # path: artifacts - # - name: make executable - # run: chmod +x artifacts/* && ls -al && ls -al artifacts/ - # - name: run lipo to create universal binary - # run: lipo -arch x86_64 artifacts/bash-macos-x86_64 -arch arm64 artifacts/bash-macos-aarch64 -create -output bash-macos-universal - # - uses: actions/upload-artifact@v3 - # with: - # name: bash-macos-universal - # path: bash-macos-universal + macos-universal: + needs: + - build + runs-on: macos-latest + steps: + - uses: actions/download-artifact@v3 + with: + path: artifacts + - name: make executable + run: chmod +x artifacts/*/* && ls -al && ls -al artifacts/ + - name: run lipo to create universal binary + run: lipo -create -arch arm64 artifacts/bash-macos-aarch64/bash-macos-aarch64 -arch x86_64 artifacts/bash-macos-x86_64/bash-macos-x86_64 -output bash-macos-universal + - uses: actions/upload-artifact@v3 + with: + name: bash-macos-universal + path: bash-macos-universal release: needs: - build - docker-build - # - macos-universal + - macos-universal if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: diff --git a/build.sh b/build.sh index 9b74cec..2ad7167 100755 --- a/build.sh +++ b/build.sh @@ -58,9 +58,9 @@ echo "= preparing gpg" GNUPGHOME="$(mktemp -d)" export GNUPGHOME # public key for bash -gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7C0135FB088AAF6C66C650B9BB5869F064EA74AB +gpg --batch --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 7C0135FB088AAF6C66C650B9BB5869F064EA74AB # public key for musl -gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F +gpg --batch --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F # download tarballs echo "= downloading bash" @@ -126,7 +126,10 @@ else # set minimum version of macOS to 10.13 export MACOSX_DEPLOYMENT_TARGET="10.13" # https://www.gnu.org/software/bash/manual/html_node/Compilers-and-Options.html - export CC="gcc -std=c89 -Wno-implicit-function-declaration -Wno-return-type" + export CC="clang -std=c89 -Wno-implicit-function-declaration -Wno-return-type" + + # use included gettext to avoid reading from other places, like homebrew + configure_args=("${configure_args[@]}" "--with-included-gettext") # if $arch is aarch64 for mac, target arm64e if [[ $arch == "aarch64" ]]; then @@ -134,6 +137,7 @@ else configure_args=("${configure_args[@]}" "--host=aarch64-apple-darwin") else export CFLAGS="-target x86_64-apple-macos10.12" + configure_args=("${configure_args[@]}" "--host=x86_64-apple-macos10.12") fi fi fi