-
Notifications
You must be signed in to change notification settings - Fork 60
159 lines (147 loc) · 5.56 KB
/
buildmacos.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Build MacOS
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- os: "macos-13"
cxx-compiler: clang++
c-compiler: clang
compiler-version: default
build-type: Release
#- os: "macos-latest"
#cxx-compiler: g++
#c-compiler: gcc
#compiler-version: 11
#build-type: RelWithDebInfo
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Cache curl
uses: actions/cache@v3
with:
path: lib/curl-8.2.1
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-curl-8.2.1-1
- name: Cache antlr
uses: actions/cache@v3
with:
path: lib/antlr
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-antlr-4.13.1
- name: Cache boost
uses: actions/cache@v3
with:
path: lib/boost_1_83_0
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-boost-1.83.0-2
- name: Cache cppdap
uses: actions/cache@v3
with:
path: lib/cppdap-2a4c7cf
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-cppdap-2a4c7cf
- name: Install Dependencies
shell: pwsh
run: |
brew install pkg-config
brew reinstall openssl@1.1
brew install ninja openssl@1.1 glib-openssl mysql-client mysql-connector-c++ openssl@3 libssh2
# Update the Homebrew-installed shared library binaries with the other architecture (amd64) via `bew-universalize`.
./bin-build/brew-universalize openssl@1.1 glib-openssl mysql-client mysql-connector-c++ openssl@3 libssh2
echo "PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/mysql-client/lib/pkgconfig:$Env:PKG_CONFIG_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
#env:
#HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: '1'
- name: Set CXX and CC
shell: pwsh
run: |
$cxx_compiler = "${{ matrix.config.cxx-compiler }}"
$c_compiler = "${{ matrix.config.c-compiler }}"
$version = '${{ matrix.config.compiler-version }}'
if ($version -ne 'default') {
$cxx_compiler = "$cxx_compiler-$version"
$c_compiler = "$c_compiler-$version"
}
echo "CXX=$cxx_compiler" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CC=$c_compiler" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "MACOSX_DEPLOYMENT_TARGET=13.3" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Config
run: |
cd bin-build
cmake .. -G Ninja -DREUSE_PCH=1 -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'
- name: Build
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} -- -j 2
- name: Test (EScript)
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target test_escript
- name: Test (Shard Fixtures)
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target test_pol_fixture
- name: Test (UnitTests)
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target unittest_pol
- name: Test (Shard)
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target test_pol_only
- name: Test (Ecompile Watch)
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target test_ecompile_watch
- name: Upload shard test log
uses: actions/upload-artifact@v3
with:
name: Testlog-${{ runner.os }}-${{ matrix.config.cxx-compiler }}
path: bin-build/coretest/log/pol.log
- name: Create Artefact
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} --target package
cd ../bin
mkdir release
mv *.zip release
- name: Upload Artefact
uses: actions/upload-artifact@v3
with:
name: Nightly-${{ runner.os }}-${{ matrix.config.cxx-compiler }}
path: bin/release
notify_on_failure:
needs: build
runs-on: "ubuntu-latest"
if: failure()
steps:
- name: Discord notification failure
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: failure
job: Building (MacOS)
notify_on_success:
needs: build
runs-on: "ubuntu-latest"
if: success()
steps:
- name: Discord notification success
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: success
job: Building (MacOS)
notify_on_cancel:
needs: build
runs-on: "ubuntu-latest"
if: cancelled()
steps:
- name: Discord notification cancelled
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: cancelled
job: Building (MacOS)