Skip to content

Commit

Permalink
Try fixing MacOS GHA build
Browse files Browse the repository at this point in the history
  • Loading branch information
animetosho committed Dec 10, 2024
1 parent 0abfdf1 commit b78142b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-dev-mac-arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build MacOS dev binary
name: Build MacOS ARM dev binary
on:
workflow_dispatch:

Expand Down Expand Up @@ -33,6 +33,7 @@ jobs:
retention-days: 5
if: ${{ failure() }}
- run: make
- run: arm64-apple-darwin21.4-strip par2
- run: |
wget -q -O- https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-x86_64-unknown-linux-musl.tar.gz | tar zxf -
apple-codesign*/rcodesign sign par2
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build-dev-mac-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build MacOS x64 dev binary
on:
workflow_dispatch:

jobs:
build-test-mac-x64:
name: Build x64 MacOS binary
runs-on: macos-13
steps:
- uses: ConorMacBride/install-package@v1
with:
# LLVM 18 introduced incompatible change with stock libc++ [https://github.com/Homebrew/homebrew-core/issues/178435#issuecomment-2270106398]
brew: automake llvm@17
# force past "The `brew link` step did not complete successfully"
continue-on-error: true
- run: |
if [ -f "`brew --prefix llvm`/bin/clang" ]; then
echo "CC=`brew --prefix llvm`/bin/clang" >> $GITHUB_ENV
echo "CXX=`brew --prefix llvm`/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS=-L`brew --prefix llvm`/lib -Wl,-rpath,`brew --prefix llvm`/lib" >> $GITHUB_ENV
echo "CFLAGS=-I`brew --prefix llvm`/include" >> $GITHUB_ENV
echo "CXXFLAGS=-I`brew --prefix llvm`/include" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
- run: aclocal && automake --warnings=all --add-missing && autoconf --warnings=all
- run: ./configure
- uses: actions/upload-artifact@v3
with:
path: ./config.log
name: configure-macos-arm64.log
retention-days: 5
if: ${{ failure() }}
- run: make
- run: strip par2
- run: ./par2 -h
- run: make check
- run: xz -9e --x86 --lzma2 par2
- uses: actions/upload-artifact@v3
with:
path: ./par2.xz
name: par2cmdline-turbo-dev-macos-arm64.xz
retention-days: 5
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ jobs:
steps:
- uses: ConorMacBride/install-package@v1
with:
brew: automake llvm
# LLVM 18 introduced incompatible change with stock libc++ [https://github.com/Homebrew/homebrew-core/issues/178435#issuecomment-2270106398]
brew: automake llvm@17
# force past "The `brew link` step did not complete successfully"
continue-on-error: true
- run: |
if [ -f "`brew --prefix llvm`/bin/clang" ]; then
echo "CC=`brew --prefix llvm`/bin/clang" >> $GITHUB_ENV
echo "CXX=`brew --prefix llvm`/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS=-L`brew --prefix llvm`/lib -Wl,-rpath,`brew --prefix llvm`/lib" >> $GITHUB_ENV
echo "CFLAGS=-I`brew --prefix llvm`/include" >> $GITHUB_ENV
echo "CXXFLAGS=-I`brew --prefix llvm`/include" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
- name: Get release
Expand Down

0 comments on commit b78142b

Please sign in to comment.