1+ ---
12name : Build Packages
23
3- on : [push, pull_request]
4+ on : pull-request
45
56jobs :
67 find-recipes :
78 runs-on : ubuntu-latest
89 outputs :
9- packages : ${{ steps.find-recipes .outputs.packages }}
10-
10+ matrix : ${{ steps.set-matrix .outputs.matrix }}
11+
1112 steps :
1213 - name : Checkout Repository
1314 uses : actions/checkout@v2
@@ -16,49 +17,35 @@ jobs:
1617 id : changed
1718 uses : jitterbit/get-changed-files@v1
1819 with :
19- format : ' json'
20+ format : " json"
2021
2122 - name : Find recipe.yaml files
22- id : find-recipes
23- run : |
24- changed=$(jq -c '[.[] | match("custom-recipes/recipes/([^/]*)/recipe.yaml") | .captures | .[].string]' <<< '${{steps.changed.outputs.added_modified}}')
25- changed=$(echo $changed | sed "s/\"//g")
26- echo "packages=\"$changed\""
27- echo "packages=\"$changed\"" >> "$GITHUB_OUTPUT"
28-
29- buildc :
30- needs : find-recipes
31- runs-on : ubuntu-latest
32-
33- steps :
34- - name : Foo
23+ id : set-matrix
3524 run : |
36- echo "${{needs.find-recipes.outputs.packages}}"
37- echo "package: ${{fromJson(needs.find-recipes.outputs.packages)}}"
25+ changed='${{steps.changed.outputs.added_modified}}'
26+ changed=$(echo $changed | jq -c '{include: [.[] | match("custom-recipes/recipes/([^/]*)/recipe.yaml") | .captures | .[].string | {package: .}]}')
27+ echo "matrix=$changed"
28+ echo "matrix=$changed" >> $GITHUB_OUTPUT
3829
39-
40- builda :
30+ build :
4131 needs : find-recipes
4232 runs-on : ubuntu-latest
33+ container :
34+ image : ghcr.io/european-xfel/environments:main
35+ options : --tmpfs /dev/shm:rw,nosuid,nodev,exec,size=1g
4336 strategy :
44- matrix :
45- package : ${{fromJson(needs.find-recipes.outputs.packages)}}
46-
47- steps :
48- - name : Foo
49- run : |
50- echo "${{needs.find-recipes.outputs.packages}}"
51- echo "${{ matrix.packages }}"
37+ matrix : ${{ fromJson(needs.find-recipes.outputs.matrix) }}
38+ name : Build "${{ matrix.package }}"
5239
53- buildb :
54- needs : find-recipes
55- runs-on : ubuntu-latest
56- strategy :
57- matrix :
58- package : ${{needs.find-recipes.outputs.packages}}
59-
6040 steps :
61- - name : Foo
41+ - name : Checkout Repository
42+ uses : actions/checkout@v2
43+
44+ - name : Build
6245 run : |
63- echo "${{needs.find-recipes.outputs.packages}}"
64- echo "${{ matrix.packages }}"
46+ cd custom-recipes
47+ mkdir conda-bld
48+ source /opt/conda/etc/profile.d/conda.sh
49+ conda activate base
50+ ./build.sh ${{ matrix.package }}
51+ shell : bash
0 commit comments