-
Notifications
You must be signed in to change notification settings - Fork 167
124 lines (109 loc) · 4.06 KB
/
macos-test.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: MacOS Test
on:
workflow_dispatch:
pull_request:
push:
tags:
- "v*.*.*"
branches:
- master
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
macos-test:
name: MacOS Clang Test
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
options: [
{build: debug, sanitizer: without-sanitizer},
{build: debug, sanitizer: address-sanitizer},
{build: debug, sanitizer: thread-sanitizer},
{build: release, sanitizer: without-sanitizer}
]
env:
LTTNG_UST_REGISTER_TIMEOUT: 0
NUGET_XMLDOC_MODE: skip
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Uninstall NodeJS and NPM
run: |
npm uninstall npm -g
rm -rf /usr/local/lib/node_modules/npm
- name: Uninstall Ruby
run: |
brew uninstall --force ruby
brew autoremove
RUBY_FRAMEWORK_DIR=$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/Ruby.framework
sudo rm -rf $RUBY_FRAMEWORK_DIR
- name: Uninstall Go
run: |
brew uninstall --force go
brew autoremove
sudo rm -rf /usr/local/Cellar/go
sudo rm -rf /usr/local/go
sudo rm -rf /usr/local/opt/go
sudo rm -rf /etc/paths.d/go
sudo rm -rf /usr/local/bin/go
sudo rm -rf /usr/local/bin/gofmt
- name: Uninstall Java
run: |
sudo rm -rf /Library/Java/JavaVirtualMachines/*
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
unset JAVA_HOME
- name: Export XCode SDK Root
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
- name: Set up the environment
run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
env:
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage
- name: Configure
run: |
cd build
. .env
bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS
env:
METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage
- name: Build
working-directory: ./build
# TODO: Remove the disable option for fork safe once funchook problem is solved
run: |
. .env
cmake -DOPTION_FORK_SAFE=OFF ..
bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests
macos-distributable:
name: MacOS Distributable Dispatch
needs: macos-test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
steps:
- name: Homebrew Workflow Dispatch
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: metacall
repo: homebrew
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: test.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: ${{ github.head_ref || github.ref_name }}
- name: MacOS Workflow Dispatch
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: metacall
repo: distributable-macos
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: ci.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: master