forked from MRtrix3/mrtrix3
-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (124 loc) · 4.26 KB
/
releases.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Releases
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to release from'
required: true
default: 'dev'
jobs:
linux-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Set env vars
id: envs
run: |
commit_sha=$(git rev-parse HEAD)
date=$(date +%Y_%m_%d)
echo "commit_sha=$commit_sha" >> $GITHUB_ENV
echo "date=$date" >> $GITHUB_ENV
echo "output_name=mrtrix3-linux-$commit_sha-$date.tar.gz" >> $GITHUB_ENV
- name: Print envs
run: |
echo $commit_sha
echo $date
echo $output_name
- name: Install Eigen3
run: |
git clone https://gitlab.com/libeigen/eigen.git && cd eigen && git checkout 3.4.0
cmake -B build && cmake --build build
sudo cmake --install build
- name: Install Qt 6
uses: jurplel/install-qt-action@v3
with:
version: '6.7.0'
set-env: true
- name: Run build
run: |
./packaging/package-linux-tarball.sh .
echo ${{ steps.envs.outputs.output_name }}
mv mrtrix.tar.gz ./${{ steps.envs.outputs.output_name }}
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.envs.outputs.output_name }}
path: ./${{ steps.envs.outputs.output_name }}
macos-release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Set env vars
id: envs
run: |
commit_sha=$(git rev-parse HEAD)
date=$(date +%Y_%m_%d)
echo "commit_sha=$commit_sha" >> $GITHUB_ENV
echo "date=$date" >> $GITHUB_ENV
echo "output_name=mrtrix3-macos-$commit_sha-$date.tar.xz" >> $GITHUB_ENV
- name: Install deps
run: brew install numpy cmake qt eigen pkg-config fftw libpng ninja
- name: Run build
run: |
cd ./packaging/macos
./build ${{ github.event.inputs.branch }}
mv ./mrtrix3-macos-${{ github.event.inputs.branch }}.tar.xz ../../${{ steps.envs.outputs.output_name }}
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.envs.outputs.output_name }}
path: ./${{ steps.envs.outputs.output_name }}
windows-release:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
MINGW_PACKAGE_PREFIX: mingw-w64-ucrt-x86_64
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: |
git
python
${{env.MINGW_PACKAGE_PREFIX}}-bc
${{env.MINGW_PACKAGE_PREFIX}}-cmake
${{env.MINGW_PACKAGE_PREFIX}}-diffutils
${{env.MINGW_PACKAGE_PREFIX}}-eigen3
${{env.MINGW_PACKAGE_PREFIX}}-fftw
${{env.MINGW_PACKAGE_PREFIX}}-gcc
${{env.MINGW_PACKAGE_PREFIX}}-libtiff
${{env.MINGW_PACKAGE_PREFIX}}-ninja
${{env.MINGW_PACKAGE_PREFIX}}-pkg-config
${{env.MINGW_PACKAGE_PREFIX}}-qt6-base
${{env.MINGW_PACKAGE_PREFIX}}-qt6-svg
${{env.MINGW_PACKAGE_PREFIX}}-zlib
- name: Checkout
run: git clone https://github.com/mrtrix3/mrtrix3 -b ${{ github.event.inputs.branch }}
- name: Set env vars
id: envs
run: |
cd mrtrix3
commit_sha=$(git rev-parse HEAD)
date=$(date +%Y_%m_%d)
echo "commit_sha=$commit_sha" >> $GITHUB_ENV
echo "date=$date" >> $GITHUB_ENV
echo "output_name=mrtrix3-windows-$commit_sha-$date.tar.zst" >> $GITHUB_ENV
- name: Run build
run: |
cd mrtrix3
cd packaging/mingw
./run.sh ${{ env.commit_sha }} mrtrix3
mv mingw*.tar.zst ../../../${{env.output_name }}
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.envs.outputs.output_name }}
path: ./${{ steps.envs.outputs.output_name }}