forked from Tulip-Dev/tulip
-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (128 loc) · 4.81 KB
/
Copy pathwindows-mingw64-build.yml
File metadata and controls
129 lines (128 loc) · 4.81 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
name: windows-mingw64-build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mingw64:
name: ${{ matrix.config.name }}
runs-on: windows-latest
env:
PYTHON_VERSION: "3.13"
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
config:
- name: Talipot build on Windows (mingw64 GCC)
msystem: mingw64
arch: x86_64
- name: Talipot build on Windows (mingw64 Clang)
msystem: clang64
arch: clang-x86_64
steps:
- name: Checkout Talipot code
uses: actions/checkout@v7
- name: Install mingw64 and Talipot build dependencies
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.config.msystem }}
update: true
cache: false
install: git
base-devel
mingw-w64-${{ matrix.config.arch }}-toolchain
mingw-w64-${{ matrix.config.arch }}-cmake
mingw-w64-${{ matrix.config.arch }}-ccache
mingw-w64-${{ matrix.config.arch }}-yajl
mingw-w64-${{ matrix.config.arch }}-zstd
mingw-w64-${{ matrix.config.arch }}-qhull
mingw-w64-${{ matrix.config.arch }}-graphviz
mingw-w64-${{ matrix.config.arch }}-libgit2
mingw-w64-${{ matrix.config.arch }}-cppunit
mingw-w64-${{ matrix.config.arch }}-fontconfig
mingw-w64-${{ matrix.config.arch }}-freetype
mingw-w64-${{ matrix.config.arch }}-fribidi
mingw-w64-${{ matrix.config.arch }}-glew
mingw-w64-${{ matrix.config.arch }}-qt6
mingw-w64-${{ matrix.config.arch }}-quazip
- if: matrix.config.msystem == 'clang64'
name: Install LLVM OpenMP
run: pacman --noconfirm -S mingw-w64-${{ matrix.config.arch }}-llvm-openmp
- name: Install Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v7
id: python-install
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install sip and sphinx
run: |
set PATH=%Python3_ROOT_DIR%\Scripts:%PATH%
pip install "sip != 6.13.0" sphinx
shell: cmd
- name: Install NSIS
uses: repolevedavaj/install-nsis@v1.3.0
with:
nsis-version: '3.11'
- name: Prepare ccache timestamp
id: get-current-date
run: |
echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT
- name: Get ccache directory
id: get-cccache-dir
run: |
ccache_dir=$(ccache -sv | grep "Cache directory" | awk '{print $3}')
echo "ccache-dir=$ccache_dir" >> $GITHUB_OUTPUT
- name: Cache files
uses: actions/cache@v6
with:
path: ${{ steps.get-cccache-dir.outputs.ccache-dir }}
key: windows-${{ matrix.config.arch }}-build-ccache-${{ steps.get-current-date.outputs.date }}
restore-keys: |
windows-${{ matrix.config.arch }}-build-ccache
- name: Create build directory
run: mkdir build
- name: Configure Talipot build with CMake
working-directory: ./build
run: cmake -G "MSYS Makefiles"
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_NEED_RESPONSE=ON
-DCMAKE_INSTALL_PREFIX=$PWD/install
-DPython3_EXECUTABLE=$Python3_ROOT_DIR/python.exe
-DTALIPOT_BUILD_TESTS=ON
-DTALIPOT_USE_CCACHE=ON ..
- name: Talipot build
working-directory: ./build
run: make -j4
- name: Install Talipot
working-directory: ./build
run: make -j4 install
- name: Run Talipot unit tests
working-directory: ./build
run: make tests
- name: Check Talipot application can be executed
working-directory: ./build/install/bin
run: ./talipot --check-application-starts --debug-plugins-load
- name: Generate Talipot NSIS installer
working-directory: ./build
run: make bundle
- name: Upload Talipot installer to GitHub Actions artifacts
uses: actions/upload-artifact@v7
with:
name: Talipot-NSIS-installer-${{ matrix.config.msystem }}
path: ./build/Talipot*.exe
- name: Get Talipot version
working-directory: ./build
id: get-talipot-version
run: |
echo "version=$(bash talipot-config --version)" >> $GITHUB_OUTPUT
- name: Upload Talipot bundle to github prerelease
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: Talipot v${{ steps.get-talipot-version.outputs.version }}
prerelease: true
artifacts: ./build/Talipot*.exe
token: ${{ secrets.GITHUB_TOKEN }}