-
-
Notifications
You must be signed in to change notification settings - Fork 11
100 lines (95 loc) · 3.08 KB
/
ci.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
name: CI
on:
push:
branches: [ main, dev, imagine ]
pull_request:
branches: [ main ]
jobs:
# build-linux-and-analyze:
build-linux:
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.25.2'
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v1
# with:
# languages: c
- name: Compile
run: |
sudo apt-get update
sudo apt-get install curl libcurl4-openssl-dev -y
cmake -B .
cmake --build . -- -j 12
chmod +x blade/blade
- name: Test
run: ctest
# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v1
- name: Generate Artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: blade-linux-${{ github.run_id }}
path: ${{github.workspace}}/blade
build-macos:
runs-on: macos-latest
steps:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.25.2'
- uses: actions/checkout@v4
- name: Compile
run: |
cmake -B . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
cmake --build . -- -j 12
chmod 755 blade/blade
- name: Test
run: ctest
- name: Generate Artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: blade-macos-${{ github.run_id }}
path: ${{github.workspace}}/blade
build-windows:
runs-on: windows-latest
steps:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.28.x'
- name: Setup WinLibs
uses: bwoodsend/[email protected]
with:
add_to_path: true
tag: 12.2.0-15.0.6-10.0.0-msvcrt-r3
- uses: actions/checkout@v4
- uses: friendlyanon/setup-vcpkg@v1
with: { committish: 3508985146f1b1d248c67ead13f8f54be5b4f5da, cache-version: "1", cache-key: "vcpkg-windows", cache-restore-keys: "vcpkg-windows" }
- name: Install Dependencies
run: |
${{ env.VCPKG_ROOT }}/vcpkg update
${{ env.VCPKG_ROOT }}/vcpkg version
${{ env.VCPKG_ROOT }}/vcpkg install curl:x64-windows libffi:x64-windows openssl:x64-windows-static libpng:x64-windows libjpeg-turbo:x64-windows
${{ env.VCPKG_ROOT }}/vcpkg list
- name: Compile
run: |
cmake -B . -G "Unix Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build . -- -j 12
- name: Test
run: ctest
- name: Generate Artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: blade-windows-default-${{ github.run_id }}
path: ${{github.workspace}}/blade