You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/workflows/build.yml
+38-4
Original file line number
Diff line number
Diff line change
@@ -97,9 +97,11 @@ jobs:
97
97
remove-haskell: true
98
98
remove-codeql: true
99
99
remove-docker-images: true
100
+
100
101
- name: Checkout
101
102
id: checkout
102
103
uses: actions/checkout@v4
104
+
103
105
- name: Get changed files and packages
104
106
id: changed-files
105
107
uses: tj-actions/changed-files@v45
@@ -110,26 +112,47 @@ jobs:
110
112
- 'build/pkgs/*/spkg-configure.m4'
111
113
pkgs:
112
114
- 'build/pkgs/**'
115
+
- '!build/pkgs/_**'
116
+
- '!build/pkgs/configure/**'
113
117
- 'pkgs/**'
114
118
doctests:
115
119
- 'src/**/*.{py,pyx,pxd,pxi,sage,spyx,rst,tex}'
116
120
- '!src/{setup,conftest*}.py'
121
+
117
122
- name: Determine targets to build
118
123
id: build-targets
119
124
run: |
120
-
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))
121
-
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))
125
+
uninstall_targets=$(echo $(
126
+
for a in '' ${{ steps.changed-files.outputs.configures_all_changed_files }}; do
127
+
# Extract package name from the file path and append '-uninstall'
128
+
echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'
129
+
done | sort -u # Sort and ensure uniqueness
130
+
))
131
+
build_targets=$(echo $(
132
+
for a in '' ${{ steps.changed-files.outputs.pkgs_all_changed_files }}; do
133
+
# Extract package name, replace '-' with '_', and strip extra parts from the path
134
+
SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;')
135
+
# Check if key files exist in the package directory
136
+
if [ -f "build/pkgs/$SPKG/checksums.ini" ] || \
137
+
[ -f "build/pkgs/$SPKG/requirements.txt" ] || \
138
+
[ -f "build/pkgs/$SPKG/spkg-install" ]; then
139
+
echo "$SPKG-ensure" # add the "$SPKG-ensure" target
0 commit comments