@@ -513,6 +513,96 @@ jobs:
513513 run : |
514514 .github/scripts/tests/cygwin/execute-tests.sh
515515
516+ execute-cygwin-tests :
517+ needs : [
518+ build-toolchain
519+ ]
520+ # Requirements for the runner:
521+ # - The runner must have WSL1 with Ubuntu 24.04 distribution installed.
522+ # - There must be user `runner` created in the WSL as the primary one.
523+ # - This `runner` user must be able to perform `sudo apt` without blocking terminal.
524+ runs-on : [Windows, WSL, ARM64]
525+
526+ defaults :
527+ run :
528+ # Run the job script created by the GitHub Actions runner as a `runner`
529+ # user in WSL. As this script is created on Windows, CRLF characters
530+ # need to be converted to LF and its path translated to WSL format.
531+ shell : wsl --user runner bash --noprofile --norc -euo pipefail "$(s="$(wslpath '{0}')" && sed -i 's/\r$//' "$s" && echo "$s")"
532+
533+ env :
534+ PLATFORM : pc-cygwin
535+ ROOT_PATH : /home/runner
536+ SOURCE_PATH :
537+ BUILD_PATH :
538+ BUILD_PACKAGE_NAME : cygwin-build.tar.gz
539+ TOOLCHAIN_PATH :
540+ TOOLCHAIN_NAME : aarch64-pc-cygwin-msvcrt
541+ TOOLCHAIN_PACKAGE_NAME : aarch64-pc-cygwin-msvcrt-toolchain.tar.gz
542+
543+ WSLENV : CYGWIN_REPO:CYGWIN_BRANCH:PLATFORM:ROOT_PATH:SOURCE_PATH/p:BUILD_PATH/p:BUILD_PACKAGE_NAME:ARTIFACT_PATH/p:TOOLCHAIN_PATH/p:TOOLCHAIN_NAME:TOOLCHAIN_PACKAGE_NAME:GITHUB_ENV/p:GITHUB_OUTPUT/p:GITHUB_STEP_SUMMARY/p
544+
545+ steps :
546+ - name : Checkout repository
547+ uses : actions/checkout@v4
548+ with :
549+ path : ${{ github.workspace }}
550+
551+ - name : Install zstd
552+ shell : powershell
553+ run : |
554+ .github/scripts/install-zstd.ps1
555+
556+ - name : Clean previous build
557+ run : |
558+ .github/scripts/delete-build.sh
559+ .github/scripts/delete-code.sh
560+
561+ - name : Install dependencies
562+ run : |
563+ .github/scripts/install-dependencies.sh
564+
565+ - name : Extract cache keys
566+ run : |
567+ .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}'
568+
569+ - name : Download ${{ env.TOOLCHAIN_NAME }} toolchain
570+ uses : actions/cache/restore@v4
571+ with :
572+ path : ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
573+ key : ${{ env.toolchain-cache-key }}
574+ enableCrossOsArchive : true
575+ fail-on-cache-miss : true
576+
577+ - name : Unpack toolchain
578+ run : |
579+ .github/scripts/toolchain/unpack.sh
580+
581+ - name : Checkout Cygwin
582+ run : |
583+ .github/scripts/update-sources.sh cygwin
584+
585+ - name : Build Cygwin
586+ run : |
587+ .github/scripts/toolchain/build-cygwin.sh 2
588+
589+ - name : Execute Cygwin tests
590+ run : |
591+ .github/scripts/toolchain/execute-cygwin-tests.sh
592+
593+ - name : Pack build folder
594+ if : failure()
595+ run : |
596+ .github/scripts/pack-build.sh
597+
598+ - name : Upload build folder
599+ if : failure()
600+ uses : actions/upload-artifact@v4
601+ with :
602+ name : cygwin-build
603+ retention-days : 1
604+ path : ${{ env.ARTIFACT_PATH }}/${{ env.BUILD_PACKAGE_NAME }}
605+
516606 build-bash :
517607 needs : [build-toolchain]
518608 runs-on : ubuntu-24.04-arm
0 commit comments