-
-
Notifications
You must be signed in to change notification settings - Fork 47
135 lines (119 loc) · 3.44 KB
/
build.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
name: "Build"
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
win:
name: 🪟 Windows
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: 🟦 Install msys2
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
pacboy: >-
gcc:p
lld:p
cmake:p
make:p
- name: 🛠️ Build
run: |
mkdir -p build
cd build
cmake -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DLIBPL_ENABLE_TESTS=OFF \
-DLIBPL_ENABLE_CLI=ON \
..
mingw32-make -j4 install DESTDIR=install
- name: ⬆️ Upload Artifact
uses: actions/upload-artifact@v3
with:
name: plcli Windows
path: |
build/install/*
macos:
name: 🍎 macOS
runs-on: macos-11
permissions:
actions: read
contents: read
security-events: write
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: ⬇️ Install dependencies
run: |
brew install llvm
- name: 🛠️ Build
run: |
mkdir -p build
cd build
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
OBJC=$(brew --prefix llvm)/bin/clang \
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DLIBPL_ENABLE_TESTS=OFF \
-DLIBPL_ENABLE_CLI=ON \
..
make -j4 install DESTDIR=install
- name: ⬆️ Upload Artifact
uses: actions/upload-artifact@v3
with:
name: plcli macOS
path: |
build/install/*
linux:
name: 🐧 Linux
runs-on: ubuntu-22.04
steps:
- name: 🧰 Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: ⬇️ Install dependencies
run: |
sudo apt update
sudo apt install -y \
build-essential \
gcc-12 \
g++-12 \
lld \
cmake \
make \
- name: 🛠️ Build
run: |
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DLIBPL_ENABLE_TESTS=OFF \
-DLIBPL_ENABLE_CLI=ON \
..
make -j4 install DESTDIR=install
- name: ⬆️ Upload Artifact
uses: actions/upload-artifact@v3
with:
name: plcli Linux
path: |
build/install/*