Skip to content

Commit

Permalink
Fix workflow conditions to support macos-14 runner
Browse files Browse the repository at this point in the history
  • Loading branch information
lwthiker committed Mar 2, 2024
1 parent 9ac0a54 commit f4aef8c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ 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
Expand Down Expand Up @@ -107,7 +107,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 @@ -117,7 +117,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 @@ -190,15 +190,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 @@ -223,12 +223,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 f4aef8c

Please sign in to comment.