Skip to content

Commit e060d3c

Browse files
committed
update workflow
Signed-off-by: wep21 <[email protected]>
1 parent 3b5e773 commit e060d3c

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/testpr.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ jobs:
7171
set +e
7272
git diff --exit-code --name-only origin/main -- additional_recipes > /dev/null
7373
echo "::set-output name=ADDITIONAL_RECIPE_CHANGED::${?}"
74+
DIRS=$(git diff --name-only origin/main -- additional_recipes \
75+
| awk -F/ '$1 == "additional_recipes" && NF >= 2 { print $1 "/" $2 }' \
76+
| sort -u | paste -sd "," -)
77+
echo "CHANGED_DIRS=$DIRS" >> "$GITHUB_OUTPUT"
78+
79+
- name: Debug
80+
run: |
81+
for dir in ${{ steps.additionalrecipecheck.outputs.CHANGED_DIRS }}; do
82+
echo "$dir"
83+
done
7484
7585
- name: Generate recipes for linux-64
7686
shell: bash -l {0}
@@ -126,15 +136,29 @@ jobs:
126136
else
127137
echo "RECIPE_CREATED=1" >> $GITHUB_OUTPUT
128138
fi
139+
- name: Build additional recipes for linux-64
140+
shell: bash -l {0}
141+
if: steps.additionalrecipecheck.outputs.ADDITIONAL_RECIPE_CHANGED == 1 && matrix.platform == 'linux-64'
142+
run: |
143+
for dir in ${{ steps.additionalrecipecheck.outputs.CHANGED_DIRS }}; do
144+
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir $dir --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
145+
done
129146
- name: Build recipes for linux-64
130147
shell: bash -l {0}
131-
if: (steps.newrecipecheck.outputs.RECIPE_CREATED == 1 || steps.additionalrecipecheck.outputs.ADDITIONAL_RECIPE_CHANGED == 1) && matrix.platform == 'linux-64'
148+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-64'
132149
run: |
133150
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
134151
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
152+
- name: Build additional recipes for linux-aarch64
153+
shell: bash -l {0}
154+
if: steps.additionalrecipecheck.outputs.ADDITIONAL_RECIPE_CHANGED == 1 && matrix.platform == 'linux-aarch64'
155+
run: |
156+
for dir in ${{ steps.additionalrecipecheck.outputs.CHANGED_DIRS }}; do
157+
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir $dir --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
158+
done
135159
- name: Build recipes for linux-aarch64
136160
shell: bash -l {0}
137-
if: (steps.newrecipecheck.outputs.RECIPE_CREATED == 1 || steps.additionalrecipecheck.outputs.ADDITIONAL_RECIPE_CHANGED == 1) && matrix.platform == 'linux-aarch64'
161+
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && matrix.platform == 'linux-aarch64'
138162
run: |
139163
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
140164
env -i $HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform linux-aarch64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing

0 commit comments

Comments
 (0)