forked from Benny44/QPALM_vLADEL
-
Notifications
You must be signed in to change notification settings - Fork 3
115 lines (108 loc) · 3.17 KB
/
macos.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
name: macOS Binaries
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
branches:
- '**'
release:
types: ['released', 'prereleased']
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Ninja
run: python3 -m pip install ninja
- name: Install Eigen
run: sudo VIRTUAL_ENV=/opt/local ./scripts/install-eigen.sh RelWithDebInfo
- name: Configure
run: |
cmake -B package -S QPALM \
-G "Ninja Multi-Config" \
-D BUILD_SHARED_LIBS=On \
-DCMAKE_POSITION_INDEPENDENT_CODE=On \
-DQPALM_WITH_CXX=On \
-DQPALM_WITH_FORTRAN=On \
-DCMAKE_Fortran_COMPILER=gfortran-11
env:
CMAKE_PREFIX_PATH: /opt/local
- name: Build Debug
run: |
cmake --build package --config Debug -j
- name: Build Release
run: |
cmake --build package --config RelWithDebInfo -j
- name: Package
run: |
cpack -C "Debug;RelWithDebInfo" \
-D CPACK_INSTALL_CMAKE_PROJECTS=".;QPALM;ALL;/;LADEL;LADEL;ALL;/"
working-directory: package
- name: Upload
uses: actions/upload-artifact@v3
with:
name: qpalm-macos
path: package/QPALM-*.tar.gz
test:
needs: [build]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Ninja
run: python3 -m pip install ninja
- name: Install Eigen
run: sudo VIRTUAL_ENV=/opt/local ./scripts/install-eigen.sh RelWithDebInfo
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-macos
path: package
- name: Install
run: |
sudo tar xzf package/QPALM-*.tar.gz --strip-components 1 \
-C /opt/local
- name: Build examples (Release)
run: |
cmake -B build-examples -S examples -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_Fortran_COMPILER=gfortran-11 \
-G "Ninja"
cmake --build build-examples -j
env:
CMAKE_PREFIX_PATH: /opt/local
- name: Run examples (Release)
run: |
./build-examples/c/qpalm_demo
./build-examples/cxx/qpalm_demo_cxx
./build-examples/fortran/qpalm_demo_fortran
- name: Build examples (Debug)
run: |
cmake -B build-examplesd -S examples -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_Fortran_COMPILER=gfortran-11 \
-G "Ninja"
cmake --build build-examplesd -j
env:
CMAKE_PREFIX_PATH: /opt/local
- name: Run examples (Debug)
run: |
./build-examplesd/c/qpalm_demo
./build-examplesd/cxx/qpalm_demo_cxx
./build-examplesd/fortran/qpalm_demo_fortran
release:
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
needs: [test]
runs-on: macos-latest
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-macos
path: package
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
files: package/QPALM-*.tar.gz