forked from porres/pd-else
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (129 loc) · 4.02 KB
/
c-cpp.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
name: C/C++ CI
on:
workflow_dispatch:
push:
branches: ["master", "CI"]
pull_request:
branches: ["master", "CI"]
env:
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
# ===============================================================
Linux-Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-linux
- name: Downloads pd-Sources
shell: bash
run: |
curl -L -o pure-data.zip https://api.github.com/repos/pure-data/pure-data/zipball/refs/tags/0.55-0
unzip pure-data.zip
rm pure-data.zip
mv pure-data-* pure-data
- name: Configure pd-else
run: |
cmake -BBuild -DPD_PATH=${{github.workspace}}/pure-data -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache"
- name: Build pd-else
run: |
cmake --build Build
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: else-linux
path: ./Build/else
# ===============================================================
macOS-Build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-macos
- name: Downloads pd sources
shell: bash
run: |
curl -L -o pure-data.zip https://api.github.com/repos/pure-data/pure-data/zipball/refs/tags/0.55-0
unzip pure-data.zip
rm pure-data.zip
mv pure-data-* pure-data
- name: Configure pd-else
run: |
cmake -BBuild -DPD_PATH=${{github.workspace}}/pure-data -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache"
- name: Build pd-else
run: |
cmake --build Build
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: else-macos
path: ./Build/else
# ===============================================================
Windows-Build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
install: make mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-ccache
cache: true
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: D:/ccache
key: ccache-windows-${{ github.run_id }}
restore-keys: |
ccache-windows-${{ github.sha }}
ccache-windows-
- name: Get Pd
shell: bash
run: |
curl -L -o pure-data.zip http://msp.ucsd.edu/Software/pd-0.55-0.msw.zip
unzip pure-data.zip
rm pure-data.zip
mv pd-0.55-0 pd
- name: Configure pd-else
shell: msys2 {0}
run: |
cmake -GNinja -BBuild -DPD_PATH=./pd -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache"
- name: Build pd-else
shell: msys2 {0}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=6
export CCACHE_MAXSIZE=1G
export CCACHE_DIR=D:/ccache
cmake --build Build
ccache -s
rm -rf ./Build/else/*.a
env:
CCACHE_COMPRESS: "1"
CCACHE_COMPRESSLEVEL: "6"
CCACHE_MAXSIZE: "1G"
CCACHE_DIR: D:/ccache
- name: Save build cache
uses: actions/cache/save@v4
with:
path: D:/ccache
key: ccache-windows-${{ github.run_id }}
- name: Upload Zip
uses: actions/upload-artifact@v4
with:
name: else-windows
path: ./Build/else
merge:
runs-on: ubuntu-latest
needs: [Windows-Build, macOS-Build, Linux-Build]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: else