-
Notifications
You must be signed in to change notification settings - Fork 1
164 lines (160 loc) · 4.88 KB
/
Copy pathlinux-reusable.yml
File metadata and controls
164 lines (160 loc) · 4.88 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
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
on:
workflow_call:
inputs:
package-name:
required: true
type: string
shell:
required: false
default: bash
type: string
requires-sdk:
default: false
required: false
type: boolean
package-sdk:
default: false
required: false
type: boolean
os:
default: Linux
required: false
type: string
arch:
default: X64
required: false
type: string
build-script:
default: build.sh
required: false
type: string
runTests:
description: "Run tests?"
required: false
type: boolean
default: false
publish:
required: false
type: boolean
default: false
build-plugins:
description: "Build all plugins?"
required: false
type: boolean
default: false
dev-release:
description: "Make a dev release?"
required: false
type: boolean
default: true
python-module:
description: "Compile Python Module?"
required: false
type: boolean
default: false
plugin:
description: "Is this a plugin repo?"
required: false
type: boolean
default: false
concurrency:
group: linux-build
cancel-in-progress: false
jobs:
build:
name: Clone and build
runs-on: [self-hosted, Linux]
outputs:
febio-version: ${{ steps.build.outputs.febio-version }}
steps:
- name: Checkout ${{ inputs.package-name }}
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Build ${{ inputs.package-name }}
id: build
uses: febiosoftware/febio-workflows/.github/actions/build@develop
with:
shell: ${{ inputs.shell }}
package-name: ${{ inputs.package-name }}
requires-sdk: ${{ inputs.requires-sdk }}
package-sdk: ${{ inputs.package-sdk }}
script: ci/${{inputs.os}}/${{inputs.build-script}}
python-module: ${{ inputs.python-module }}
os: ${{inputs.os}}
arch: ${{inputs.arch}}
- name: Get plugin repos
if: inputs.build-plugins
id: get-plugin-repos
uses: febiosoftware/febio-workflows/.github/actions/get-plugin-repos@develop
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout plugin repos
if: inputs.build-plugins
uses: febiosoftware/febio-workflows/.github/actions/checkout-plugins@develop
with:
repo_list: ${{ steps.get-plugin-repos.outputs.repo_list }}
- name: Build plugins
if: inputs.build-plugins
uses: febiosoftware/febio-workflows/.github/actions/build-plugins@develop
with:
repo_list: ${{ steps.get-plugin-repos.outputs.repo_list }}
- name: Upload plugins
if: inputs.build-plugins
uses: febiosoftware/febio-workflows/.github/actions/upload-plugins@develop
with:
os: ${{inputs.os}}
arch: ${{inputs.arch}}
tests:
if: inputs.runTests
name: Run test suite
needs:
- build
runs-on: [self-hosted, Linux]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Tests
uses: febiosoftware/febio-workflows/.github/actions/run-tests@develop
with:
script: ci/${{inputs.os}}/test.sh
shell: ${{ inputs.shell }}
package-name: ${{ inputs.package-name }}
os: ${{inputs.os}}
arch: ${{inputs.arch}}
build-plugins: ${{ inputs.build-plugins }}
git-test-suite-token: ${{ secrets.TESTSUITE_WRITE }}
git-token: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish
needs:
- build
- tests
runs-on: [self-hosted, Linux]
if: >
${{
always() && inputs.publish &&
contains(fromJson('["success"]'), needs.build.result) &&
contains(fromJson('["success", "skipped"]'), needs.tests.result) &&
!github.event.pull_request.head.repo.fork
}}
steps:
- name: Repo Artifacts
uses: febiosoftware/febio-workflows/.github/actions/repo-artifacts@develop
with:
build-plugins: ${{ inputs.build-plugins }}
dev-release: ${{ inputs.dev-release }}
python-module: ${{ inputs.python-module }}
package-sdk: ${{ inputs.package-sdk }}
shell: ${{ inputs.shell }}
package-name: ${{ inputs.package-name }}
os: ${{inputs.os}}
arch: ${{inputs.arch}}
plugin: ${{inputs.plugin}}
febio-version: ${{ needs.build.outputs.febio-version }}
- name: Publish SDK
if: ${{ inputs.package-sdk }}
run: |
scp sdk/sdk.zip shell:/uufs/sci.utah.edu/projects/Weiss/ci/sdk/${{ inputs.package-name }}-sdk-${{inputs.os}}-${{inputs.arch}}.zip