2727 DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
2828 TEST_FULL_SUMMARY_FILE : ' gnu-full-result.json'
2929 TEST_ROOT_FULL_SUMMARY_FILE : ' gnu-root-full-result.json'
30+ TEST_STTY_FULL_SUMMARY_FILE : ' gnu-stty-full-result.json'
3031 TEST_SELINUX_FULL_SUMMARY_FILE : ' selinux-gnu-full-result.json'
3132 TEST_SELINUX_ROOT_FULL_SUMMARY_FILE : ' selinux-root-gnu-full-result.json'
32- REPO_GNU_REF : " v9.8"
3333
3434jobs :
3535 native :
@@ -38,10 +38,20 @@ jobs:
3838 steps :
3939 # ### Get the code, setup cache
4040 - name : Checkout code (uutils)
41- uses : actions/checkout@v5
41+ uses : actions/checkout@v6
4242 with :
4343 path : ' uutils'
4444 persist-credentials : false
45+ - name : Extract GNU version from build-gnu.sh
46+ id : gnu-version
47+ run : |
48+ GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
49+ if [ -z "$GNU_VERSION" ]; then
50+ echo "Error: Failed to extract GNU version from build-gnu.sh"
51+ exit 1
52+ fi
53+ echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
54+ echo "Extracted GNU version: ${GNU_VERSION}"
4555 - uses : dtolnay/rust-toolchain@master
4656 with :
4757 toolchain : stable
5060 with :
5161 workspaces : " ./uutils -> target"
5262 - name : Checkout code (GNU coreutils)
53- uses : actions/checkout@v5
63+ uses : actions/checkout@v6
5464 with :
5565 repository : ' coreutils/coreutils'
5666 path : ' gnu'
7181 run : |
7282 ## Install dependencies
7383 sudo apt-get update
74- sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev libselinux1-dev attr quilt
84+ ## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
85+ sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
7586 - name : Add various locales
7687 shell : bash
7788 run : |
89100 sudo locale-gen --keep-existing en_US
90101 sudo locale-gen --keep-existing en_US.UTF-8
91102 sudo locale-gen --keep-existing ru_RU.KOI8-R
103+ sudo locale-gen --keep-existing fa_IR.UTF-8 # Iran
104+ sudo locale-gen --keep-existing am_ET.UTF-8 # Ethiopia
105+ sudo locale-gen --keep-existing th_TH.UTF-8 # Thailand
92106
93107 sudo update-locale
94108 echo "After:"
@@ -100,7 +114,7 @@ jobs:
100114 run : |
101115 ## Build binaries
102116 cd 'uutils'
103- bash util/build-gnu.sh --release-build
117+ env PROFILE=release-small bash util/build-gnu.sh
104118
105119 # ## Run tests as user
106120 - name : Run GNU tests
@@ -124,12 +138,34 @@ jobs:
124138 path_GNU='gnu'
125139 path_UUTILS='uutils'
126140 bash "uutils/util/run-gnu-test.sh" run-root
141+
127142 - name : Extract testing info from individual logs (run as root) into JSON
128143 shell : bash
129144 run : |
130145 path_UUTILS='uutils'
131146 python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
132147
148+ # ## This shell has been changed from "bash" to this command
149+ # ## "script" will start a pty and the -q command removes the "script" initiation log
150+ # ## the -e flag makes it propagate the error code and -c runs the command in a pty
151+ # ## the primary purpose of this change is to run the tty GNU tests
152+ # ## The reason its separated from the rest of the tests is because one test can corrupt the other
153+ # ## tests through the use of the shared terminal and it changes the environment that the other
154+ # ## tests are run in, which can cause different results.
155+ - name : Run GNU stty tests
156+ shell : ' script -q -e -c "bash {0}"'
157+ run : |
158+ ## Run GNU root tests
159+ path_GNU='gnu'
160+ path_UUTILS='uutils'
161+ bash "uutils/util/run-gnu-test.sh" run-tty
162+
163+ - name : Extract testing info from individual logs (stty) into JSON
164+ shell : bash
165+ run : |
166+ path_UUTILS='uutils'
167+ python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
168+
133169 # ## Upload artifacts
134170 - name : Upload full json results
135171 uses : actions/upload-artifact@v5
@@ -141,6 +177,12 @@ jobs:
141177 with :
142178 name : gnu-root-full-result
143179 path : ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
180+ - name : Upload stty json results
181+ uses : actions/upload-artifact@v5
182+ with :
183+ name : gnu-stty-full-result
184+ path : ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
185+
144186 - name : Compress test logs
145187 shell : bash
146188 run : |
@@ -160,10 +202,20 @@ jobs:
160202 steps :
161203 # ### Get the code, setup cache
162204 - name : Checkout code (uutils)
163- uses : actions/checkout@v5
205+ uses : actions/checkout@v6
164206 with :
165207 path : ' uutils'
166208 persist-credentials : false
209+ - name : Extract GNU version from build-gnu.sh
210+ id : gnu-version-selinux
211+ run : |
212+ GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
213+ if [ -z "$GNU_VERSION" ]; then
214+ echo "Error: Failed to extract GNU version from build-gnu.sh"
215+ exit 1
216+ fi
217+ echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
218+ echo "Extracted GNU version: ${GNU_VERSION}"
167219 - uses : dtolnay/rust-toolchain@master
168220 with :
169221 toolchain : stable
@@ -172,7 +224,7 @@ jobs:
172224 with :
173225 workspaces : " ./uutils -> target"
174226 - name : Checkout code (GNU coreutils)
175- uses : actions/checkout@v5
227+ uses : actions/checkout@v6
176228 with :
177229 repository : ' coreutils/coreutils'
178230 path : ' gnu'
@@ -197,9 +249,7 @@ jobs:
197249 path : ~/.cache/lima
198250 key : lima-${{ steps.lima-actions-setup.outputs.version }}
199251 - name : Start Fedora VM with SELinux
200- run : limactl start --plain --name=default --cpus=4 --disk=40 --memory=8 --network=lima:user-v2 template://fedora
201- - name : Setup SSH
202- uses : lima-vm/lima-actions/ssh@v1
252+ run : limactl start --plain --name=default --cpus=4 --disk=40 --memory=8 --network=lima:user-v2 template:fedora
203253 - name : Verify SELinux Status and Configuration
204254 run : |
205255 lima getenforce
@@ -218,7 +268,7 @@ jobs:
218268 - name : Install dependencies in VM
219269 run : |
220270 lima sudo dnf -y update
221- lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc g++ gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex wget automake patch quilt
271+ lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex automake patch quilt
222272 lima rustup-init -y --default-toolchain stable
223273 - name : Copy the sources to VM
224274 run : |
@@ -227,7 +277,7 @@ jobs:
227277 # ## Build
228278 - name : Build binaries
229279 run : |
230- lima bash -c "cd ~/work/uutils/ && bash util/build-gnu.sh --release-build "
280+ lima bash -c "cd ~/work/uutils/ && SELINUX_ENABLED=1 PROFILE=release-small bash util/build-gnu.sh"
231281
232282 # ## Run tests as user
233283 - name : Generate SELinux tests list
@@ -311,7 +361,7 @@ jobs:
311361
312362 outputs TEST_SUMMARY_FILE AGGREGATED_SUMMARY_FILE
313363 - name : Checkout code (uutils)
314- uses : actions/checkout@v5
364+ uses : actions/checkout@v6
315365 with :
316366 path : ' uutils'
317367 persist-credentials : false
@@ -337,6 +387,13 @@ jobs:
337387 name : gnu-root-full-result
338388 path : results
339389 merge-multiple : true
390+ - name : Download stty json results
391+ uses : actions/download-artifact@v6
392+ with :
393+ name : gnu-stty-full-result
394+ path : results
395+ merge-multiple : true
396+
340397 - name : Download selinux json results
341398 uses : actions/download-artifact@v6
342399 with :
@@ -359,7 +416,7 @@ jobs:
359416 path_UUTILS='uutils'
360417
361418 json_count=$(ls -l results/*.json | wc -l)
362- if [[ "$json_count" -ne 4 ]]; then
419+ if [[ "$json_count" -ne 5 ]]; then
363420 echo "::error ::Failed to download all results json files (expected 4 files, found $json_count); failing early"
364421 ls -lR results || true
365422 exit 1
0 commit comments