Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 7 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -126,14 +126,18 @@ 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
export CFLAGS="-target arm64-apple-macos"
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
Expand Down