From 2849630cd8ecb349b41527932b3d033c2c9ab1a0 Mon Sep 17 00:00:00 2001 From: Vincent Thiberville Date: Mon, 9 Dec 2024 02:09:07 +0100 Subject: [PATCH] ci: add arm64 macos runner --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 912bf3af..ab69c97f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,13 +135,24 @@ jobs: target: i686-pc-windows-msvc test-macos: - name: Test Macos 13 - runs-on: macos-13 + name: Test ${{matrix.runner}} + runs-on: ${{matrix.runner}} env: RUSTFLAGS: -Dwarnings steps: + # On macos 14, yara does not find the openssl include dir, so retrieve + # them and set them properly. + - name: Setup openssl + run: | + pkg-config --cflags libcrypto + pkg-config --libs-only-L libcrypto + OPENSSL_INCLUDE_DIR=$(pkg-config --cflags libcrypto | cut -dI -f2-) + OPENSSL_LIB_DIR=$(pkg-config --libs-only-L libcrypto | cut -dL -f2-) + echo "YARA_OPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR" >> $GITHUB_ENV + echo "YARA_OPENSSL_LIB_DIR=$OPENSSL_LIB_DIR" >> $GITHUB_ENV + - uses: actions/checkout@v4.1.1 - uses: dtolnay/rust-toolchain@stable @@ -171,6 +182,16 @@ jobs: run: | sudo cargo test -- --test-threads=1 --ignored + strategy: + fail-fast: false + matrix: + build: [macos-x64, macos-arm64] + include: + - build: macos-x64 + runner: macos-13 + - build: macos-arm64 + runner: macos-14 + clippy: name: Clippy runs-on: ubuntu-22.04