Skip to content

Commit

Permalink
.github/workflows/ci-linux-incremental.yml: Update build_target scrip…
Browse files Browse the repository at this point in the history
…t from build.yml, use ptest-nodoc to avoid duplicate doc-html build
  • Loading branch information
Matthias Koeppe committed Jun 3, 2024
1 parent 4db3313 commit 3586090
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ jobs:
runs-on: ubuntu-latest
name: List changed packages
outputs:
uninstall_targets: ${{ steps.build-targets.outputs.uninstall_targets }}
build_targets: ${{ steps.build-targets.outputs.build_targets }}
steps:
- uses: actions/checkout@v4
- name: Get all packages that have changed
id: changed-packages
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
Expand All @@ -58,14 +57,19 @@ jobs:
- name: Determine targets to build
id: build-targets
run: |
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))" >> $GITHUB_OUTPUT
uninstall_targets=$(echo $(for a in '' ${{ steps.changed-files.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))
build_targets=$(echo $(for a in '' ${{ steps.changed-files.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))
if [ -n "$uninstall_targets" ]; then
echo "build_targets=$uninstall_targets reconfigure $build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
else
echo "build_targets=$build_targets ci-build-with-fallback" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: worktree-base
if: github.base_ref
if: github.base_ref && steps.changed-files.outputs.pkgs_all_changed_files
- name: Compute metrics
run: |
export PATH=build/bin:$PATH
Expand All @@ -88,7 +92,7 @@ jobs:
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} reconfigure ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
targets: "${{needs.changed_files.outputs.build_targets}} doc-html ptest-nodoc"
tox_system_factors: >-
["ubuntu-focal",
"ubuntu-noble",
Expand All @@ -115,7 +119,7 @@ jobs:
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} reconfigure ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
targets: "${{needs.changed_files.outputs.build_targets}} doc-html ptest-nodoc"
# Only test systems with a usable system python (>= 3.9)
# with only a small number of test failures as of 10.2.rc0
tox_system_factors: >-
Expand Down

0 comments on commit 3586090

Please sign in to comment.