Skip to content

Commit

Permalink
add aarch64 for darwin and set os version for x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-h committed May 30, 2024
1 parent 2c9b318 commit ca9c47c
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
strategy:
matrix:
NGINX_VERSION:
- 1.24.x
- 1.25.x
- 1.26.x
ARCH:
Expand Down Expand Up @@ -78,11 +77,10 @@ jobs:

nginx-x86_64-darwin:
name: nginx-${{ matrix.NGINX_VERSION }}-x86_64-darwin
runs-on: macos-latest
runs-on: macos-13
strategy:
matrix:
NGINX_VERSION:
- 1.24.x
- 1.25.x
- 1.26.x
steps:
Expand Down Expand Up @@ -118,11 +116,53 @@ jobs:
name: nginx-${{ matrix.NGINX_VERSION }}-x86_64-darwin
path: artifact/*

nginx-aarch64-darwin:
name: nginx-${{ matrix.NGINX_VERSION }}-aarch64-darwin
runs-on: macos-14
strategy:
matrix:
NGINX_VERSION:
- 1.25.x
- 1.26.x
steps:
- name: Install dependencies
run: brew install gsed jansson jq openssl@3 pcre zlib

- name: Checkout master branch
uses: actions/checkout@v4
with:
path: master

- name: Download and extract nginx
run: ./master/scripts/fetch-sources -d . nginx/nginx@release-${{ matrix.NGINX_VERSION }}

# cmake prefers dynamic libs and there's no option to change it, so
# we have to remove them to give it no other option than using static.
- name: Remove dylibs
run: |
rm /opt/homebrew/opt/jansson/lib/*.dylib
rm /opt/homebrew/opt/openssl/lib/*.dylib
rm /opt/homebrew/opt/pcre/lib/*.dylib
rm /opt/homebrew/opt/zlib/lib/*.dylib
- name: Build nginx
env:
CFLAGS: ${{ env.CFLAGS }} -I/opt/homebrew/opt/jansson/include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/pcre/include -I/opt/homebrew/opt/zlib/include
LDFLAGS: ${{ env.DARWIN_LDFLAGS }} -L/opt/homebrew/opt/jansson/lib -L/opt/homebrew/opt/openssl/lib -L/opt/homebrew/opt/pcre/lib -L/opt/homebrew/opt/zlib/lib
run: ./master/scripts/build-nginx

- name: Upload nginx binary to artifacts
uses: actions/upload-artifact@v4
with:
name: nginx-${{ matrix.NGINX_VERSION }}-aarch64-darwin
path: artifact/*

upload:
name: Upload binaries
needs:
- nginx-multi-linux
- nginx-x86_64-darwin
- nginx-aarch64-darwin
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
container:
Expand Down

0 comments on commit ca9c47c

Please sign in to comment.