Skip to content

Commit

Permalink
Build on macos-14 GitHub runner (Mac M1) in CI (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwthiker authored Mar 3, 2024
1 parent f49b5b2 commit 822dbef
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build-and-test-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
host: x86_64-macos
capture_interface: en0
make: gmake
- os: macos-14
arch: aarch64
host: aarch64-macos
capture_interface: en0
make: gmake
steps:
- uses: actions/setup-python@v4
with:
Expand All @@ -66,12 +71,11 @@ jobs:
sudo apt-get install gcc-${{ matrix.host }} g++-${{ matrix.host }}
- name: Install macOS dependencies
if: matrix.os == 'macos-12'
if: startsWith(matrix.os, 'macos')
run: |
brew install pkg-config make cmake ninja autoconf automake libtool
# Chrome version dependencies
# (Go is already installed)
# brew install go
brew install --force --overwrite go
# Needed to compile 'minicurl'
brew install curl
# More dependencies for the tests
Expand Down Expand Up @@ -102,7 +106,7 @@ jobs:
rm -f ${{ runner.temp }}/zlib/lib/libz.so
- name: Run configure script
if: matrix.arch == 'x86_64'
if: matrix.arch == 'x86_64' || startsWith(matrix.os, 'macos')
run: |
mkdir ${{ runner.temp }}/install
./configure --prefix=${{ runner.temp }}/install \
Expand All @@ -112,7 +116,7 @@ jobs:
# curl's configure script can't figure out where some files and libraries
# are located. The locations used here are the ones used by Ubuntu.
- name: Run configure script (cross compiling)
if: matrix.arch != 'x86_64'
if: matrix.os == 'ubuntu-20.04' && matrix.arch != 'x86_64'
run: |
mkdir ${{ runner.temp }}/install
./configure --prefix=${{ runner.temp }}/install \
Expand Down Expand Up @@ -185,15 +189,15 @@ jobs:
${{ matrix.make }} firefox-install
- name: Prepare the tests
if: matrix.arch == 'x86_64'
if: matrix.arch == 'x86_64' || startsWith(matrix.os, 'macos')
run: |
# Compile 'minicurl' which is used by the tests
gcc -Wall -Werror -o ${{ runner.temp }}/install/bin/minicurl tests/minicurl.c `curl-config --libs`
# For now we can only run the tests when not cross compiling, since the
# tests run the curl-impersonate binary locally.
- name: Run the tests
if: matrix.arch == 'x86_64'
if: matrix.arch == 'x86_64' || startsWith(matrix.os, 'macos')
run: |
cd tests
# sudo is needed for capturing packets
Expand All @@ -218,12 +222,12 @@ jobs:
# Recompile curl-impersonate statically when doing a release.
- name: Reconfigure statically
if: startsWith(github.ref, 'refs/tags/') && matrix.arch == 'x86_64'
if: startsWith(github.ref, 'refs/tags/') && (matrix.arch == 'x86_64' || startsWith(matrix.os, 'macos'))
run: |
./configure --prefix=${{ runner.temp }}/install --enable-static
- name: Reconfigure statically (cross compiling)
if: startsWith(github.ref, 'refs/tags/') && matrix.arch != 'x86_64'
if: startsWith(github.ref, 'refs/tags/') && (matrix.os == 'ubuntu-20.04' && matrix.arch != 'x86_64')
run: |
./configure --prefix=${{ runner.temp }}/install \
--enable-static \
Expand Down

0 comments on commit 822dbef

Please sign in to comment.