From 1e6930a04d2a47700d4c9f14c2b8e530264b30b1 Mon Sep 17 00:00:00 2001 From: Sam Stuewe Date: Fri, 31 May 2024 10:19:21 -0500 Subject: [PATCH] devex: add support for macOS in the CI This is the core step towards making macOS officially-supported rather than a bit of a second-class citizen. Signed-off-by: Sam Stuewe --- .github/workflows/{ci.yml => linux-ci.yml} | 0 .github/workflows/macos-ci.yml | 61 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) rename .github/workflows/{ci.yml => linux-ci.yml} (100%) create mode 100644 .github/workflows/macos-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/linux-ci.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/linux-ci.yml diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml new file mode 100644 index 000000000..b80943161 --- /dev/null +++ b/.github/workflows/macos-ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: + pull_request: + branches: + - trunk + push: + branches: + - trunk + +defaults: + run: + shell: bash + +env: + BUILD_DIR: x86_64 + +jobs: + build-release: + name: Build Release Candidate + runs-on: macos-latest + env: + BUILD_RELEASE: 1 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Setup Build Env + run: sudo ./scripts/install-build-tools.sh + - name: Setup Local Dependencies + run: ./scripts/setup-dependencies.sh + - name: Build + run: scripts/build.sh + unit-and-integration-test: + name: Unit and Integration Tests + runs-on: macos-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Setup Build Env + run: sudo ./scripts/install-build-tools.sh + - name: Setup Local Dependencies + run: ./scripts/setup-dependencies.sh + - name: Build + run: scripts/build.sh + - name: Run Unit Tests + run: scripts/test.sh + - name: Shorten SHA + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - uses: actions/upload-artifact@v2 + if: ${{ !env.ACT }} + name: Archive Test Results + with: + name: Test Results for ${{ steps.vars.outputs.sha_short }} + path: | + ${{env.BUILD_DIR}}/unit_tests_coverage/output/* + ${{env.BUILD_DIR}}/integration_tests_coverage/output/* + retention-days: 7