-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (61 loc) · 1.88 KB
/
main.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
name: Build
on:
push:
jobs:
ubuntu-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install dependencies (1)
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: |
openscad=2021.01*
calculix-ccx=2.17*
qtbase5-dev=5.15*
libtet1.5-dev=1.5*
libgtest-dev=1.11*
- name: Install dependencies (2)
# There's some kind of subtle bug where awalsh128/cache-apt-pkgs-action fails
# to restore the C++ header files properly from the cache. So we have to reinstall
# the C++ headers every time.
run: |
sudo apt-get install \
libcgal-dev=5.4*
- name: Install linuxdeploy
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: qt appimage
- name: Use ccache
uses: hendrikmuhs/ccache-action@v1
- name: Compile
run: |
qmake
make -j $(nproc) CC="ccache gcc" CXX="ccache g++"
- name: Test
run: test/test
- name: Build AppImage
run: |
export APPIMAGE_EXTRACT_AND_RUN=1
linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--executable gui/OpenSCAD2CalculiX \
--icon-file gui/OpenSCAD2CalculiX.png \
--desktop-file gui/OpenSCAD2CalculiX.desktop \
--plugin=qt \
--output=appimage
mv OpenSCAD2CalculiX-*-x86_64.AppImage OpenSCAD2CalculiX-latest-x86_64.AppImage
- name: Tag latest
if: ${{ github.ref == 'refs/heads/master' }}
uses: richardsimko/update-tag@v1
with:
tag_name: latest
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Release latest
if: ${{ github.ref == 'refs/heads/master' }}
uses: softprops/action-gh-release@v1
with:
tag_name: latest
files: OpenSCAD2CalculiX-latest-x86_64.AppImage