diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 438a6e0..23d56b2 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -32,7 +32,6 @@ jobs: strategy: matrix: NGINX_VERSION: - - 1.24.x - 1.25.x - 1.26.x ARCH: @@ -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: @@ -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: