Skip to content

Commit 600c703

Browse files
committed
Add tests and release job for macos
1 parent df2347f commit 600c703

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.github/workflows/release-macos.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
release:
3+
types: [published]
4+
permissions:
5+
contents: write
6+
jobs:
7+
upload:
8+
runs-on: macos-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Pull submodules
13+
run: git submodule update --init --recursive
14+
- name: Set up Homebrew
15+
uses: Homebrew/actions/setup-homebrew@master
16+
- name: Install dependencies
17+
run: |
18+
brew install meson ninja gcc-13
19+
- name: Build
20+
run: |
21+
CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Db_sanitize=address,undefined -Dcpp_debugstl=true
22+
ninja -C build
23+
- name: Test
24+
run: |
25+
ninja -C build test
26+
- name: Upload to release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
mv build/oicompare oicompare-arm64
31+
gh release upload ${{ github.event.release.tag_name }} oicompare-arm64

.github/workflows/test-macos.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: test-macos
2+
run-name: Run tests on ARM macOS
3+
on:
4+
push:
5+
branches: ['master']
6+
pull_request:
7+
jobs:
8+
test:
9+
runs-on: macos-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
- name: Pull submodules
14+
run: git submodule update --init --recursive
15+
- name: Set up Homebrew
16+
uses: Homebrew/actions/setup-homebrew@master
17+
- name: Install dependencies
18+
run: |
19+
brew install meson ninja gcc-13
20+
- name: Build
21+
run: |
22+
CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Db_sanitize=address,undefined -Dcpp_debugstl=true
23+
ninja -C build
24+
- name: Test
25+
run: |
26+
ninja -C build test

tester.cc

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <string>
77
#include <string_view>
88
#include <variant>
9+
#include <unistd.h>
910

1011
#include <fmt/format.h>
1112

0 commit comments

Comments
 (0)