-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (91 loc) · 4.79 KB
/
Copy pathBuildCoreAndPlugins.yml
File metadata and controls
99 lines (91 loc) · 4.79 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
# This workflow does not contain any actual build steps
# it dispatches other workflows to perform the actual work.
name: BuildCoreAndPlugins
on: workflow_dispatch # Trigger this manually or possibly with a chrono
jobs:
build_core_first:
name: Build core first
runs-on: ubuntu-latest
steps:
- uses: convictional/trigger-workflow-and-wait@v1.3.0
with:
owner: hdps
repo: core
ref: master
wait_interval: 20
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
workflow_file_name: testbuildcore.yml
trigger_workflow: true
wait_workflow: true
configure_plugin_matrix:
name: Configure plugin versions matrix
runs-on: ubuntu-latest
needs: build_core_first
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7.9'
- name: Setup Environment
run: |
python3 -m pip install PyGithub
python3 -m pip install packaging
- name: Get core and plugin versions
run: |
echo "CORE_VERSION=$(python3 get_core_version.py ${{ github.ref }})" >> $GITHUB_ENV
echo "BUILDREF_SCATTERPLOT=$(python3 get_plugin_ref.py hdps Scatterplot ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_IMAGELOADERPLUGIN=$(python3 get_plugin_ref.py hdps ImageLoaderPlugin ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_TSNEANALYSIS=$(python3 get_plugin_ref.py hdps t-SNE-Analysis ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_IMAGEVIEWERPLUGIN=$(python3 get_plugin_ref.py hdps ImageViewerPlugin ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_HDF5LOADER=$(python3 get_plugin_ref.py hdps HDF5Loader ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_DIMENSIONSVIEWERPLUGIN=$(python3 get_plugin_ref.py hdps DimensionsViewerPlugin ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_PARALLELCOORDINATESPLUGIN=$(python3 get_plugin_ref.py hdps ParallelCoordinatesPlugin ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_CSVLOADER=$(python3 get_plugin_ref.py hdps CsvLoader ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_FCSLOADER=$(python3 get_plugin_ref.py hdps FcsLoader ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
echo "BUILDREF_BINIO=$(python3 get_plugin_ref.py hdps BinIO ${{ secrets.REPO_ACCESS_TOKEN }} ${{ env.CORE_VERSION }})" >> $GITHUB_ENV
working-directory: ./ci_scripts
- name: Build plugin matrix
id: set-matrix
run: |
new_matrix="{\"include\": [
{\"plugin\": \"Scatterplot\", \"ref\": \"${{ env.BUILDREF_SCATTERPLOT }}\"},
{\"plugin\": \"ImageLoaderPlugin\", \"ref\": \"${{ env.BUILDREF_IMAGELOADERPLUGIN }}\"},
{\"plugin\": \"t-SNE-Analysis\", \"ref\": \"${{ env.BUILDREF_TSNEANALYSIS }}\"},
{\"plugin\": \"ImageViewerPlugin\", \"ref\": \"${{ env.BUILDREF_IMAGEVIEWERPLUGIN }}\"},
{\"plugin\": \"HDF5Loader\", \"ref\": \"${{ env.BUILDREF_HDF5LOADER }}\"},
{\"plugin\": \"DimensionsViewerPlugin\", \"ref\": \"${{ env.BUILDREF_DIMENSIONSVIEWERPLUGIN }}\"},
{\"plugin\": \"ParallelCoordinatesPlugin\", \"ref\": \"${{ env.BUILDREF_PARALLELCOORDINATESPLUGIN }}\"},
{\"plugin\": \"CsvLoader\", \"ref\": \"${{ env.BUILDREF_CSVLOADER }}\"},
{\"plugin\": \"FcsLoader\", \"ref\": \"${{ env.BUILDREF_FCSLOADER }}\"},
{\"plugin\": \"BinIO\", \"ref\": \"${{ env.BUILDREF_BINIO }}\"}
]}"
new_matrix="${new_matrix//$'\n'/''}"
new_matrix="${new_matrix//$'\r'/''}"
echo "$new_matrix"
echo "::set-output name=matrix::$new_matrix"
echo "Output set to ${{ steps.configure_plugin_matrix.outputs.matrix }}"
build_all_plugins:
name: Build all plugins
runs-on: ubuntu-latest
needs: configure_plugin_matrix
strategy:
matrix: ${{ fromJson(needs.configure_plugin_matrix.outputs.matrix) }}
steps:
- name: Check matrix
run: |
echo "Repo value: ${{ matrix.plugin }}"
echo "Ref value: ${{ matrix.ref }}"
- name: Run plugin builds
uses: convictional/trigger-workflow-and-wait@v1.3.0
with:
owner: hdps
repo: ${{ matrix.plugin }}
ref: ${{ matrix.ref }}
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
workflow_file_name: testworkflow.yml
propagate_failure: true
trigger_workflow: true
wait_workflow: false