forked from kakwa/libemf2svg
-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (81 loc) · 2.77 KB
/
macos-x86_64.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: MacOS-x86_64
on:
push:
paths-ignore:
- '.github/workflows/alpine-x86_64.yml'
- '.github/workflows/ubuntu-x86_64.yml'
- '.github/workflows/ubuntu-aarch64.yml'
- '.github/workflows/msys-x86_64.yml'
- '.github/workflows/windows-x86_64.yml'
- '.github/workflows/macos-arm64.yml'
pull_request:
workflow_dispatch:
env:
BUILD_TYPE: Release
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/cache
jobs:
build-and-test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install packages
run: |
brew install argp-standalone coreutils
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}
- name: Test well formed files
working-directory: ${{ github.workspace }}
run: ./tests/resources/check_correctness.sh -r -s
- name: Test corrupted files
working-directory: ${{ github.workspace }}
run: ./tests/resources/check_correctness.sh -r -s -e tests/resources/emf-corrupted/ -xN
- name: Test EA files
working-directory: ${{ github.workspace }}
run: ./tests/resources/check_correctness.sh -r -s -e tests/resources/emf-ea/
build-for-ruby:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup environment
run: |
echo 'BREW_HOME<<EOF' >> $GITHUB_ENV
brew --prefix >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Install packages
run: brew install bash
- name: Create cache storage and cache key
run: |
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
git submodule status > sm.txt
- name: Process cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ github.workflow }}-vcpkg-${{ hashFiles('sm.txt') }}
- name: Configure CMake
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DVCPKG_TARGET_TRIPLET=x64-osx \
-DLONLY=ON \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}
- name: Checkout shell test framework
uses: actions/checkout@v4
with:
repository: kward/shunit2
path: tests/shunit2
fetch-depth: 1
- name: Run additional tests
run: ${{ env.BREW_HOME }}/bin/bash tests/resources/lcheck.sh