-
Notifications
You must be signed in to change notification settings - Fork 120
204 lines (197 loc) · 6.92 KB
/
integration.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
on:
push:
branches:
- master
pull_request:
branches:
- master
- 'release/*'
workflow_dispatch:
inputs:
version:
description: 'Version (e.g., if 1.2.3, then binaries look like cctools-1.2.3-ARCH.tar.gz)'
required: true
tag:
description: 'Tag to deploy (e.g. release/7.2.1)'
required: true
name: Test and deploy
jobs:
build-native-linux:
runs-on: ubuntu-latest
container: ${{ format('cclnd/cctools-env:x86_64-{0}', matrix.os-name) }}
timeout-minutes: 30
env:
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, matrix.os-name) }}
CCTOOLS_DOCKER_GITHUB: ${{ matrix.os-name }}
strategy:
matrix:
os-name: ['almalinux8', 'almalinux9', 'ubuntu20.04']
steps:
- name: checkout CCTools from branch head
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v3
- name: checkout CCTools from tag
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
- name: Get sha of tag
id: vars
shell: bash
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: build
run: ${GITHUB_WORKSPACE}/packaging/build-docker/build.sh
- name: deploy
uses: ncipollo/release-action@v1
if: github.event_name == 'workflow_dispatch'
with:
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactContentType: application/gzip
draft: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
replacesArtifacts: true
commit: ${{ steps.vars.output.tag_sha }}
tag: ${{ github.event.inputs.tag }}
build-conda-linux:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-linux-conda.tar.gz', github.event.inputs.version) }}
steps:
- name: Checkout CCTools from branch head
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
- name: Checkout CCTools from tag
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Get sha of tag
id: vars
shell: bash
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Conda-Setup
run: ${GITHUB_WORKSPACE}/packaging/build-conda/setup.sh
- name: Configure
run: ${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh
- name: Build
run: ${GITHUB_WORKSPACE}/packaging/build-conda/build.sh
- name: Install
run: ${GITHUB_WORKSPACE}/packaging/build-conda/install.sh
- name: Test
run: ${GITHUB_WORKSPACE}/packaging/build-conda/test.sh
- name: Deploy
uses: ncipollo/release-action@v1
if: github.event_name == 'workflow_dispatch'
with:
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactContentType: application/gzip
draft: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
replacesArtifacts: true
commit: ${{ steps.vars.output.tag_sha }}
tag: ${{ github.event.inputs.tag }}
build-conda-macos-x86_64:
runs-on: ${{ matrix.os-name }}
strategy:
matrix:
os-name: ['macos-12','macos-13']
timeout-minutes: 30
env:
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, matrix.os-name) }}
CCTOOLS_SOURCE_PROFILE: yes
steps:
- name: checkout CCTools from branch head
uses: actions/checkout@v4
- name: Get sha of tag
id: vars
shell: bash
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Conda-Setup
run: ${GITHUB_WORKSPACE}/packaging/build-conda/setup.sh
- name: Configure
run: ${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh
- name: Build
run: ${GITHUB_WORKSPACE}/packaging/build-conda/build.sh
- name: Install
run: ${GITHUB_WORKSPACE}/packaging/build-conda/install.sh
- name: Test
run: ${GITHUB_WORKSPACE}/packaging/build-conda/test.sh
- name: deploy
uses: ncipollo/release-action@v1
if: github.event_name == 'workflow_dispatch'
with:
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactContentType: application/gzip
draft: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
replacesArtifacts: true
commit: ${{ steps.vars.output.tag_sha }}
tag: ${{ github.event.inputs.tag }}
build-conda-macos-arm64:
runs-on: ${{ matrix.os-name }}
strategy:
matrix:
os-name: ['macos-14']
timeout-minutes: 30
env:
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-arm64-{1}.tar.gz', github.event.inputs.version, matrix.os-name) }}
CCTOOLS_SOURCE_PROFILE: yes
steps:
- name: checkout CCTools from branch head
uses: actions/checkout@v4
- name: Get sha of tag
id: vars
shell: bash
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Conda-Setup
run: ${GITHUB_WORKSPACE}/packaging/build-conda/setup.sh
- name: Configure
run: ${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh
- name: Build
run: ${GITHUB_WORKSPACE}/packaging/build-conda/build.sh
- name: Install
run: ${GITHUB_WORKSPACE}/packaging/build-conda/install.sh
- name: Test
run: ${GITHUB_WORKSPACE}/packaging/build-conda/test.sh
- name: deploy
uses: ncipollo/release-action@v1
if: github.event_name == 'workflow_dispatch'
with:
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }}
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactContentType: application/gzip
draft: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
replacesArtifacts: true
commit: ${{ steps.vars.output.tag_sha }}
tag: ${{ github.event.inputs.tag }}
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: checkout CCTools from branch head
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
- name: checkout CCTools from tag
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: lint code
run: ${GITHUB_WORKSPACE}/packaging/lint/lint.sh