From 8a2b005fe15dbcf66d91344c7524f3d54b5ecb61 Mon Sep 17 00:00:00 2001 From: Travis Finkenauer Date: Sat, 20 Apr 2024 23:36:56 -0700 Subject: [PATCH] ci: add macos support via github actions Install newer version bash via homebrew. Also print debug info about the current bash. --- .github/workflows/main.yml | 5 +++++ capstone-rs/ci/test.sh | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d72104a..b3c0733 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ jobs: os: - ubuntu-latest - windows-latest + - macos-latest runs-on: ${{ matrix.os }} steps: @@ -29,6 +30,10 @@ jobs: toolchain: ${{ matrix.rust.version }} override: true + - name: install recent bash on macos + if: ${{ startsWith(matrix.os, 'macos') }} + run: brew install bash + - name: test run: env ${{ matrix.rust.env }} ./capstone-rs/ci/test.sh diff --git a/capstone-rs/ci/test.sh b/capstone-rs/ci/test.sh index 7fe647f..2b9a06e 100755 --- a/capstone-rs/ci/test.sh +++ b/capstone-rs/ci/test.sh @@ -14,6 +14,12 @@ # - SKIP_CARGO_UPDATE: set to disable "cargo update" part of tests # - VALGRIND_TESTS: run tests under Valgrind +# Useful debug info +echo "BASH=${BASH}" +echo "BASH_VERSION=${BASH_VERSION}" +echo "BASH_OPTIONS=$-" +echo "BASH_COMPAT=${BASH_COMPAT}" + set -euo pipefail set -x