-
Notifications
You must be signed in to change notification settings - Fork 79
179 lines (152 loc) · 6.49 KB
/
build-linux.yml
File metadata and controls
179 lines (152 loc) · 6.49 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
name: build-linux
on:
push:
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ccache: ccache
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-linux:
runs-on: ubuntu-24.04
strategy:
matrix:
cfg:
- {target: linux}
env:
TARGET: ${{ matrix.cfg.target }}
steps:
# - name: Install libunwind
# run: sudo apt-get install libunwind-dev wget2
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
key: ${{ matrix.cfg.target }}
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "PRERELEASE=false" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RELEASE=nightly" >> $GITHUB_ENV
echo "PRERELEASE=false" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "RELEASE=bleeding" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
else
echo "RELEASE=bleeding" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
fi
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
- name: Install
run: ./scripts/linux/ci_install_core.sh
- name: List directory
run: ls -lah ./
- name: Build
run: ./../openFrameworks/apps/projectGenerator/scripts/linux/build_cmdline.sh
- name: Test cmdline
run: ./../openFrameworks/apps/projectGenerator/scripts/linux/test_cmdline.sh
- name: List output directory
run: ls -lah ./../openFrameworks/apps/projectGenerator/commandLine/bin
- name: Copy commandLine to frontend
run: |
cp ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator ./../openFrameworks/apps/projectGenerator/frontend/app/projectGenerator
chmod 755 ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator
- name: Build and Package projectGenerator Linux GUI
shell: bash
run: |
cd ../openFrameworks/apps/projectGenerator/frontend
npm install
npm update
npm run dist:linux64
cd dist
pwd
ls
- name: Build and Package projectGenerator Linux GUI
shell: bash
run: |
cd ../openFrameworks/apps/projectGenerator/frontend
npm install
npm update
npm run dist:linux:arm64
cd dist
pwd
ls
- name: Build and Package projectGenerator Linux GUI
shell: bash
run: |
cd ../openFrameworks/apps/projectGenerator/frontend
npm install
npm update
npm run dist:linux:armv7l
cd dist
pwd
ls
- name: List output frontend dist dir
run: ls -lah ./../openFrameworks/apps/projectGenerator/frontend/dist
- name: Copy GUI tarball to root directory
run: |
cd ./../openFrameworks/apps/projectGenerator/frontend/dist
mv projectGenerator-0.95.0.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-gui.gz
- name: Copy GUI tarball to root directory
run: |
cd ./../openFrameworks/apps/projectGenerator/frontend/dist
mv projectGenerator-0.95.0-arm64.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-arm64-gui.gz
- name: Copy GUI tarball to root directory
run: |
cd ./../openFrameworks/apps/projectGenerator/frontend/dist
mv projectGenerator-0.95.0-armv7l.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-armv7l-gui.gz
- name: Test Artefact zip
run: |
cd ./../openFrameworks/apps/projectGenerator/commandLine/bin/
ls -la
tar -cjf projectGenerator-linux.tar.bz2 projectGenerator
mv projectGenerator-linux.tar.bz2 $GITHUB_WORKSPACE/projectGenerator-linux.tar.bz2
- name: List output top
run: ls -lah $GITHUB_WORKSPACE
- name: Update Release Linux
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: softprops/action-gh-release@v2.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: projectGenerator-linux.tar.bz2
- name: Update Release Linux gui
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: softprops/action-gh-release@v2.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: projectGenerator-linux-gui.gz
- name: Update Release Linux gui - arm64
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: softprops/action-gh-release@v2.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: projectGenerator-linux-arm64-gui.gz
- name: Update Release Linux gui - armv7l
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: softprops/action-gh-release@v2.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: projectGenerator-linux-armv7l-gui.gz
- name: Update Latest Tag - DateTime
uses: EndBug/latest-tag@latest
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
with:
ref: nightly
description: Latest Always Nightly Builds
force-branch: true