forked from Benny44/QPALM_vLADEL
-
Notifications
You must be signed in to change notification settings - Fork 3
122 lines (115 loc) · 3.34 KB
/
windows.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
name: Windows Binaries
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
branches:
- '**'
release:
types: ['released', 'prereleased']
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Eigen
shell: powershell
run: ./scripts/install-eigen.ps1 RelWithDebInfo
env:
VIRTUAL_ENV: Eigen-install
- name: Configure
shell: powershell
run: |
cmake -B package -S QPALM `
-D BUILD_SHARED_LIBS=On `
-DCMAKE_POSITION_INDEPENDENT_CODE=On `
-DQPALM_WITH_CXX=On `
-DQPALM_WITH_FORTRAN=Off
env:
CMAKE_PREFIX_PATH: Eigen-install
- name: Build Debug
shell: powershell
run: |
cmake --build package --config Debug -j
- name: Build Release
shell: powershell
run: |
cmake --build package --config RelWithDebInfo -j
- name: Package
shell: powershell
run: |
cpack -C "Debug;RelWithDebInfo" `
-D CPACK_INSTALL_CMAKE_PROJECTS=".;QPALM;ALL;/;LADEL;LADEL;ALL;/" `
-G "ZIP"
working-directory: package
- name: Upload
uses: actions/upload-artifact@v3
with:
name: qpalm-windows
path: package/QPALM-*-win64.zip
test:
needs: [build]
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Eigen
shell: powershell
run: ./scripts/install-eigen.ps1 RelWithDebInfo
env:
VIRTUAL_ENV: Eigen-install
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-windows
path: package
- name: Install
shell: powershell
run: |
Expand-Archive -Path package/QPALM-*-win64.zip `
-DestinationPath QPALM-install
mv QPALM-install/QPALM-*-win64 QPALM-install/QPALM
echo "$pwd\QPALM-install\QPALM\bin" | Out-File -Append -FilePath $Env:GITHUB_PATH
- name: Build examples (Release)
shell: powershell
run: |
cmake -B build-examples -S examples
cmake --build build-examples -j --config RelWithDebInfo
env:
CMAKE_PREFIX_PATH: "Eigen-install;QPALM-install/QPALM"
- name: Run examples (Release)
shell: powershell
run: |
./build-examples/c/RelWithDebInfo/qpalm_demo
./build-examples/cxx/RelWithDebInfo/qpalm_demo_cxx
# ./build-examples/fortran/RelWithDebInfo/qpalm_demo_fortran
- name: Build examples (Debug)
shell: powershell
run: |
cmake --build build-examples -j --config Debug
env:
CMAKE_PREFIX_PATH: "Eigen-install;QPALM-install/QPALM"
- name: Run examples (Debug)
shell: powershell
run: |
./build-examples/c/Debug/qpalm_demo
./build-examples/cxx/Debug/qpalm_demo_cxx
# ./build-examples/fortran/Debug/qpalm_demo_fortran
release:
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
needs: [test]
runs-on: ubuntu-20.04
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-windows
path: package
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
files: package/QPALM-*-win64.zip