-
Notifications
You must be signed in to change notification settings - Fork 1
183 lines (146 loc) · 5.16 KB
/
build-dynamic-lib.yml
File metadata and controls
183 lines (146 loc) · 5.16 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Build LagrangeCodec Dynamic Library
on:
workflow_dispatch:
push:
branches:
- '*'
jobs:
build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
uses: MinoruSekine/setup-scoop@v4.0.1
with:
apps: ninja
- uses: ilammy/msvc-dev-cmd@v1
- name: Build LagrangeCodec
run: |
$env:VCPKG_ROOT = "C:\vcpkg"
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"
cmake -DCMAKE_BUILD_TYPE=Release --preset msvc-x64-windows-static-release -S . -B build
cd build && ninja && ls
- name: Run Tests
run: |
cd build && ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: LagrangeCodec.x64.dll
path: build/LagrangeCodec.dll
build-windows-x86:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
uses: MinoruSekine/setup-scoop@v4.0.1
with:
apps: ninja
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Build LagrangeCodec
run: |
$env:VCPKG_ROOT = "C:\vcpkg"
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"
cmake -DCMAKE_BUILD_TYPE=Release --preset msvc-x86-windows-static-release -S . -B build
cmake --build build
- name: Run Tests
run: |
cd build && ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: LagrangeCodec.x86.dll
path: build/LagrangeCodec.dll
build-linux-amd64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
run: |
sudo apt-get update && sudo apt install build-essential cmake ninja-build nasm -y
- name: Build LagrangeCodec
run: |
export VCPKG_ROOT="/usr/local/share/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"
cmake -DCMAKE_BUILD_TYPE=Release --preset gcc-x64-linux-static-release -S . -B build
cmake --build build
- name: Run Tests
run: |
cd build && ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: libLagrangeCodec.x64.so
path: build/libLagrangeCodec.so
build-linux-aarch64:
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
run: |
sudo apt-get update && sudo apt install build-essential cmake ninja-build nasm -y
- name: Build LagrangeCodec
run: |
export VCPKG_ROOT="/usr/local/share/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"
cmake -DCMAKE_BUILD_TYPE=Release --preset gcc-arm64-linux-static-release -S . -B build
cmake --build build
- name: Run Tests
run: |
cd build && ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: libLagrangeCodec.arm64.so
path: build/libLagrangeCodec.so
build-macos-amd64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
run: |
softwareupdate --install-rosetta --agree-to-license
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install cmake make nasm ninja
arch -x86_64 /usr/local/bin/brew link --overwrite make
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && arch -x86_64 /bin/bash ./bootstrap-vcpkg.sh
- name: Build LagrangeCodec
run: |
export VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg
export PATH=$VCPKG_ROOT:$PATH
arch -x86_64 /usr/local/bin/cmake --preset clang-x64-osx-static-release -S . -B build
cd build && arch -x86_64 /usr/local/bin/ninja
- name: Run Tests
run: |
cd build && arch -x86_64 /usr/local/bin/ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: libLagrangeCodec.x64.dylib
path: build/libLagrangeCodec.dylib
build-macos-aarch64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Toolchains
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
brew install cmake ninja nasm
- name: Build LagrangeCodec
run: |
export VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg
export PATH=$VCPKG_ROOT:$PATH
cmake -DCMAKE_BUILD_TYPE=Release --preset clang-arm64-osx-static-release -S . -B build
cmake --build build
- name: Run Tests
run: |
cd build && ctest -C Release -V --no-compress-output
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: libLagrangeCodec.arm64.dylib
path: build/libLagrangeCodec.dylib