Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on macos-14 GitHub runner (Mac M1) in CI #223

Merged
merged 7 commits into from
Mar 3, 2024
Merged
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
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
Loading