-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathci-distro-trial_3-test-metapackage-platform.yaml
More file actions
115 lines (103 loc) · 3.38 KB
/
Copy pathci-distro-trial_3-test-metapackage-platform.yaml
File metadata and controls
115 lines (103 loc) · 3.38 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
on:
workflow_call:
inputs:
solved-environment-key:
required: true
type: string
matrix-key:
required: true
type: string
rebuilt-channel-key:
required: true
type: string
patched-channel-key:
required: true
type: string
distro-name:
required: true
type: string
runner_label:
required: true
type: string
platform_label:
required: true
type: string
env:
matrix_path: './matrix'
solved_environment_path: './env-file'
patched_channel_path: './patched-channel'
rebuilt_channel_path: './rebuilt-channel'
jobs:
configure_matrix:
name: 'Set up build matrix'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.matrix-key }}
path: '${{ env.matrix_path }}'
- id: set-matrix
run: |
echo "matrix=$(cat ${{ env.matrix_path }}/retest_matrix.json)" >> $GITHUB_OUTPUT
run_matrix:
name: '${{ matrix.package }} (${{ inputs.platform_label }})'
needs: configure_matrix
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.configure_matrix.outputs.matrix) }}
runs-on: ${{ inputs.runner_label }}
steps:
- name: get environment path
uses: actions/download-artifact@v4
with:
pattern: ${{ inputs.solved-environment-key }}-*
path: ${{ env.solved_environment_path }}
merge-multiple: true
- name: 'Fetch base channel with patches'
uses: actions/download-artifact@v4
with:
name: ${{ inputs.patched-channel-key }}
path: ${{ env.patched_channel_path }}
- name: 'Fetch rebuilt channel'
uses: actions/download-artifact@v4
with:
name: ${{ inputs.rebuilt-channel-key }}
path: ${{ env.rebuilt_channel_path }}
- name: Maximize build space for linux
shell: bash
if: ${{ runner.os == 'Linux' }}
run: |
echo "Removing unwanted software... "
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
echo "... done"
- name: install environment
id: env
uses: qiime2/action-library-packaging/create-env@beta
with:
conda-prefix: './test-env'
environment-file: ${{ env.solved_environment_path }}/${{ inputs.distro-name }}-${{ inputs.platform_label }}-conda.yml
- name: run qiime info
if: ${{ inputs.distro-name != 'test' }}
shell: bash
run: |
${{ steps.env.outputs.conda-activate }}
qiime info
- name: 'collect package path'
id: 'collect-package'
uses: qiime2/action-library-packaging/collect-package@beta
with:
runner: ${{ inputs.runner_label }}
package: ${{ matrix.package }}
channels: '["${{ env.rebuilt_channel_path }}", "${{ env.patched_channel_path }}"]'
- name: 'run tests'
uses: qiime2/action-library-packaging/test-package@beta
with:
conda-activate: ${{ steps.env.outputs.conda-activate }}
package-path: ${{ steps.collect-package.outputs.path }}