Skip to content

Commit

Permalink
Add tests and release job for macOS (#4)
Browse files Browse the repository at this point in the history
* Add tests and release job for macos

* Fix gcc installation

* Remove sanitizers on macos
  • Loading branch information
MasloMaslane authored Sep 9, 2024
1 parent 2e6da67 commit 8be5de2
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on:
release:
types: [published]
permissions:
contents: write
jobs:
upload:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull submodules
run: git submodule update --init --recursive
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install dependencies
run: |
brew install meson ninja gcc@13
- name: Build
run: |
CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
ninja -C build
- name: Test
run: |
ninja -C build test
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv build/oicompare oicompare-arm64
gh release upload ${{ github.event.release.tag_name }} oicompare-arm64
26 changes: 26 additions & 0 deletions .github/workflows/test-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test-macos
run-name: Run tests on ARM macOS
on:
push:
branches: ['master']
pull_request:
jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull submodules
run: git submodule update --init --recursive
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install dependencies
run: |
brew install meson ninja gcc@13
- name: Build
run: |
CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
ninja -C build
- name: Test
run: |
ninja -C build test
1 change: 1 addition & 0 deletions tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string>
#include <string_view>
#include <variant>
#include <unistd.h>

#include <fmt/format.h>

Expand Down

0 comments on commit 8be5de2

Please sign in to comment.