WIP: Use --without-cross-bootstrap for stage1 Cygwin build
#2082
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build toolchain variants | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| binutils_branch: | |
| description: 'Binutils branch to build' | |
| required: false | |
| default: 'woarm64' | |
| gcc_branch: | |
| description: 'GCC branch to build' | |
| required: false | |
| default: 'woarm64' | |
| mingw_branch: | |
| description: 'MinGW branch to build' | |
| required: false | |
| default: 'woarm64' | |
| cygwin_branch: | |
| description: 'Cygwin branch to build' | |
| required: false | |
| default: 'woarm64' | |
| cygwin_packages_branch: | |
| description: 'Cygwin packages branch to build' | |
| required: false | |
| default: 'main' | |
| cocom_branch: | |
| description: 'COCOM branch to build' | |
| required: false | |
| default: 'master' | |
| openblas_branch: | |
| description: 'OpenBLAS branch to test' | |
| required: false | |
| default: 'develop' | |
| openssl_branch: | |
| description: 'OpenSSL branch to test' | |
| required: false | |
| default: 'fix-tests' | |
| workflow_call: | |
| inputs: | |
| binutils_branch: | |
| type: string | |
| gcc_branch: | |
| type: string | |
| mingw_branch: | |
| type: string | |
| cygwin_branch: | |
| type: string | |
| cygwin_packages_branch: | |
| type: string | |
| cocom_branch: | |
| type: string | |
| outputs: | |
| toolchain-package-name: | |
| value: ${{ jobs.build-toolchain.outputs.toolchain-package-name }} | |
| toolchain-artifact-name: | |
| value: ${{ jobs.build-toolchain.outputs.toolchain-artifact-name }} | |
| runtime-package-name: | |
| value: ${{ jobs.build-toolchain.outputs.runtime-package-name }} | |
| runtime-artifact-name: | |
| value: ${{ jobs.build-toolchain.outputs.runtime-artifact-name }} | |
| toolchain-cache-key: | |
| value: ${{ jobs.build-toolchain.outputs.toolchain-cache-key }} | |
| runtime-cache-key: | |
| value: ${{ jobs.build-toolchain.outputs.runtime-cache-key }} | |
| env: | |
| BINUTILS_REPO: Windows-on-ARM-Experiments/binutils-woarm64 | |
| BINUTILS_BRANCH: ${{ inputs.binutils_branch || 'woarm64' }} | |
| GCC_REPO: Windows-on-ARM-Experiments/gcc-woarm64 | |
| GCC_BRANCH: ${{ inputs.gcc_branch || 'woarm64' }} | |
| MINGW_REPO: Windows-on-ARM-Experiments/mingw-woarm64 | |
| MINGW_BRANCH: ${{ inputs.mingw_branch || 'woarm64' }} | |
| CYGWIN_REPO: Windows-on-ARM-Experiments/newlib-cygwin | |
| CYGWIN_BRANCH: ${{ inputs.cygwin_branch || 'aarch64-patch-series1-v1' }} | |
| CYGWIN_PACKAGES_REPO: Windows-on-ARM-Experiments/cygwin-packages | |
| CYGWIN_PACKAGES_BRANCH: ${{ inputs.cygwin_packages_branch || 'main' }} | |
| COCOM_REPO: git://git.code.sf.net/p/cocom/git | |
| COCOM_BRANCH: ${{ inputs.cocom_branch || 'master' }} | |
| OPENBLAS_REPO: OpenMathLib/OpenBLAS | |
| OPENBLAS_BRANCH: ${{ inputs.openblas_branch || 'develop' }} | |
| ZLIB_REPO: madler/zlib | |
| ZLIB_BRANCH: 'master' | |
| LIBXML2_REPO: GNOME/libxml2 | |
| # master branch contains an issue with va_list | |
| # perhaps after changes in testapi.c | |
| LIBXML2_BRANCH: '2.14' | |
| OPENSSL_REPO: Windows-on-ARM-Experiments/openssl | |
| OPENSSL_BRANCH: ${{ inputs.openssl_branch || 'fix-tests' }} | |
| LIBJPEG_TURBO_REPO: libjpeg-turbo/libjpeg-turbo | |
| LIBJPEG_TURBO_BRANCH: 3.0.2 | |
| FFMPEG_REPO: FFmpeg/FFmpeg | |
| FFMPEG_BRANCH: release/6.1 | |
| BASH_REPO: Windows-on-ARM-Experiments/bash | |
| BASH_BRANCH: woarm64 | |
| TOOLCHAIN_PATH: ${{ github.workspace }}/cross | |
| TOOLCHAIN_NAME: aarch64-w64-mingw32-msvcrt | |
| TOOLCHAIN_ARTIFACT_NAME: aarch64-w64-mingw32-msvcrt-toolchain | |
| TOOLCHAIN_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-toolchain.tar.gz | |
| RUNTIME_ARTIFACT_NAME: aarch64-w64-mingw32-msvcrt-toolchain | |
| RUNTIME_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-runtime.tar.gz | |
| SOURCE_PATH: ${{ github.workspace }}/code | |
| BUILD_PATH: ${{ github.workspace }}/build | |
| CCACHE_DIR_PATH: ${{ github.workspace }}/ccache | |
| ARTIFACT_PATH: ${{ github.workspace }}/artifact | |
| RELATIVE_ARTIFACT_PATH: ./artifact | |
| CCACHE: 1 | |
| DELETE_BUILD: 1 | |
| jobs: | |
| build-toolchain: | |
| runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [aarch64, x86_64] | |
| platform: [w64-mingw32, pc-linux-gnu, pc-cygwin] | |
| crt: [msvcrt, ucrt, libc] | |
| exclude: | |
| - platform: w64-mingw32 | |
| crt: libc | |
| - platform: pc-linux-gnu | |
| crt: msvcrt | |
| - platform: pc-linux-gnu | |
| crt: ucrt | |
| - platform: pc-cygwin | |
| crt: ucrt | |
| - platform: pc-cygwin | |
| crt: libc | |
| env: | |
| ARCH: ${{ matrix.arch }} | |
| PLATFORM: ${{ matrix.platform }} | |
| CRT: ${{ matrix.crt }} | |
| PACK_TOOLCHAIN: ${{ matrix.arch == 'aarch64' && (matrix.platform == 'w64-mingw32' || matrix.platform == 'pc-cygwin') && matrix.crt == 'msvcrt' }} | |
| TOOLCHAIN_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }} | |
| TOOLCHAIN_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-toolchain | |
| TOOLCHAIN_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-toolchain.tar.gz | |
| RUNTIME_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-runtime | |
| RUNTIME_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-runtime.tar.gz | |
| TESTS_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests | |
| TESTS_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests.tar.gz | |
| BUILD_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| fetch-depth: 0 | |
| - name: Get cache keys | |
| id: cache-keys | |
| run: | | |
| .github/scripts/get-cache-keys.sh | |
| - name: Cache toolchain | |
| id: cache-toolchain | |
| if: ${{ env.PACK_TOOLCHAIN == 'true' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ steps.cache-keys.outputs.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| - name: Cache runtime | |
| id: cache-runtime | |
| if: ${{ env.PACK_TOOLCHAIN == 'true' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ steps.cache-keys.outputs.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| - name: Checkout binutils | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.BINUTILS_REPO }} | |
| ref: ${{ env.BINUTILS_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/binutils | |
| - name: Checkout GCC | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.GCC_REPO }} | |
| ref: ${{ env.GCC_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/gcc | |
| - name: Checkout MinGW | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.MINGW_REPO }} | |
| ref: ${{ env.MINGW_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/mingw | |
| - name: Checkout Cygwin | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.CYGWIN_REPO }} | |
| ref: ${{ env.CYGWIN_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/cygwin | |
| - name: Checkout Cygwin packages | |
| if: ${{ false && steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.CYGWIN_PACKAGES_REPO }} | |
| ref: ${{ env.CYGWIN_PACKAGES_BRANCH }} | |
| submodules: 'recursive' | |
| path: ${{ env.SOURCE_PATH }}/cygwin-packages | |
| - name: Checkout COCOM | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| cd ${{ env.SOURCE_PATH }} | |
| git clone ${{ env.COCOM_REPO }} -b ${{ env.COCOM_BRANCH }} cocom | |
| - name: Install dependencies | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| run: | | |
| .github/scripts/install-dependencies.sh | |
| - name: Install libraries | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| run: | | |
| .github/scripts/install-libraries.sh | |
| - name: Restore Ccache | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.CCACHE_DIR_PATH }} | |
| key: ${{ steps.cache-keys.outputs.ccache-key }} | |
| restore-keys: ${{ steps.cache-keys.outputs.ccache-restore-keys }} | |
| - name: Build binutils | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| env: | |
| # Don't delete build files, they're needed for running binutils tests in the next step. | |
| DELETE_BUILD: 0 | |
| run: | | |
| .github/scripts/binutils/build.sh | |
| - name: Execute binutils tests | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| run: | | |
| .github/scripts/toolchain/execute-binutils-tests.sh | |
| - name: Delete binutils build files | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.DELETE_BUILD == 1 }} | |
| run: | | |
| .github/scripts/binutils/delete-build.sh | |
| - name: Install cross headers and libraries | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-linux-gnu' }} | |
| run: | | |
| .github/scripts/toolchain/install-cross-headers-libs.sh | |
| - name: Build MinGW headers | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }} | |
| run: | | |
| .github/scripts/toolchain/build-mingw-headers.sh | |
| - name: Install Cygwin headers | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| .github/scripts/toolchain/install-cygwin-headers.sh | |
| - name: Build GCC stage1 | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }} | |
| run: | | |
| .github/scripts/toolchain/build-gcc-stage1.sh | |
| - name: Build MinGW CRT | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }} | |
| run: | | |
| .github/scripts/toolchain/build-mingw-crt.sh | |
| - name: Build MinGW winpthreads | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'w64-mingw32' }} | |
| run: | | |
| .github/scripts/toolchain/build-mingw-winpthreads.sh | |
| - name: Build COCOM | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| .github/scripts/toolchain/build-cocom.sh | |
| - name: Build Cygwin stage1 | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| .github/scripts/toolchain/build-cygwin.sh 1 | |
| - name: Build GCC stage2 | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }} | |
| run: | | |
| .github/scripts/toolchain/build-gcc.sh | |
| - name: Build MinGW | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'w64-mingw32' }} | |
| run: | | |
| .github/scripts/toolchain/build-mingw.sh | |
| - name: Build Cygwin stage2 | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| .github/scripts/toolchain/build-cygwin.sh 2 | |
| - name: Save Ccache | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && always() }} | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ env.CCACHE_DIR_PATH }} | |
| key: ${{ steps.cache-keys.outputs.ccache-key }} | |
| - name: Strip host binaries | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }} | |
| run: | | |
| .github/scripts/strip-host-binaries.sh | |
| - name: Pack toolchain | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }} | |
| run: | | |
| .github/scripts/toolchain/pack.sh | |
| - name: Pack runtime | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }} | |
| run: | | |
| .github/scripts/toolchain/pack-runtime.sh | |
| - name: Upload build folder | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && failure() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.BUILD_ARTIFACT_NAME }} | |
| retention-days: 1 | |
| path: ${{ env.BUILD_PATH }} | |
| - name: Upload toolchain artifact | |
| if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_ARTIFACT_NAME }} | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| retention-days: 3 | |
| - name: Upload runtime artifact | |
| if: ${{ steps.cache-runtime.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.RUNTIME_ARTIFACT_NAME }} | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| retention-days: 3 | |
| outputs: | |
| toolchain-package-name: ${{ env.PACK_TOOLCHAIN == 'true' && env.TOOLCHAIN_PACKAGE_NAME || '' }} | |
| toolchain-artifact-name: ${{ env.PACK_TOOLCHAIN == 'true' && env.TOOLCHAIN_ARTIFACT_NAME || '' }} | |
| runtime-package-name: ${{ env.PACK_TOOLCHAIN == 'true' && env.RUNTIME_PACKAGE_NAME || '' }} | |
| runtime-artifact-name: ${{ env.PACK_TOOLCHAIN == 'true' && env.RUNTIME_ARTIFACT_NAME || '' }} | |
| toolchain-cache-key: ${{ env.PACK_TOOLCHAIN == 'true' && steps.cache-keys.outputs.toolchain-cache-key || '' }} | |
| aarch64-w64-mingw32-msvcrt-toolchain-cache-key: ${{ env.aarch64-w64-mingw32-msvcrt-toolchain-cache-key }} | |
| aarch64-pc-cygwin-msvcrt-toolchain-cache-key: ${{ env.aarch64-pc-cygwin-msvcrt-toolchain-cache-key }} | |
| runtime-cache-key: ${{ env.PACK_TOOLCHAIN == 'true' && steps.cache-keys.outputs.runtime-cache-key || '' }} | |
| aarch64-w64-mingw32-msvcrt-runtime-cache-key: ${{ env.aarch64-w64-mingw32-msvcrt-runtime-cache-key }} | |
| aarch64-pc-cygwin-msvcrt-runtime-cache-key: ${{ env.aarch64-pc-cygwin-msvcrt-runtime-cache-key }} | |
| build-aarch64-tests: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [aarch64] | |
| platform: [w64-mingw32, pc-cygwin] | |
| crt: [msvcrt] | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |
| TESTS_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests | |
| TESTS_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests.tar.gz | |
| TOOLCHAIN_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }} | |
| TOOLCHAIN_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-toolchain.tar.gz | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Build aarch64-tests | |
| if: ${{ matrix.platform == 'w64-mingw32' }} | |
| run: | | |
| .github/scripts/tests/build.sh | |
| - name: Build Cygwin toolchain tests | |
| if: ${{ matrix.platform == 'pc-cygwin' }} | |
| run: | | |
| .github/scripts/tests/cygwin/build-tests.sh | |
| - name: Pack tests | |
| run: | | |
| .github/scripts/tests/pack.sh | |
| - name: Upload build-aarch64-mingw-tests | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TESTS_ARTIFACT_NAME }} | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TESTS_PACKAGE_NAME }} | |
| retention-days: 3 | |
| execute-aarch64-tests: | |
| needs: [ | |
| build-toolchain, | |
| build-aarch64-tests | |
| ] | |
| runs-on: windows-11-arm | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [aarch64] | |
| platform: [w64-mingw32, pc-cygwin] | |
| crt: [msvcrt] | |
| env: | |
| RUNTIME_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-runtime.tar.gz | |
| TESTS_ARTIFACT_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests | |
| TESTS_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-tests.tar.gz | |
| TOOLCHAIN_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }} | |
| TOOLCHAIN_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-toolchain.tar.gz | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Install zstd | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Extract cache keys | |
| shell: bash | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} runtime | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ env.runtime-cache-key }} | |
| restore-keys: ${{ env.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TESTS_ARTIFACT_NAME }} | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime | |
| run: | | |
| .github/scripts/toolchain/unpack-runtime.ps1 | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} tests | |
| run: | | |
| .github/scripts/tests/unpack.ps1 | |
| - name: Execute ${{ env.TOOLCHAIN_NAME }} tests | |
| if: ${{ matrix.platform == 'w64-mingw32' }} | |
| run: | | |
| .github/scripts/tests/execute-tests.ps1 | |
| - name: Execute ${{ env.TOOLCHAIN_NAME }} tests | |
| if: ${{ matrix.platform == 'pc-cygwin' }} | |
| shell: bash | |
| run: | | |
| .github/scripts/tests/cygwin/execute-tests.sh | |
| execute-cygwin-tests: | |
| needs: [ | |
| build-toolchain | |
| ] | |
| # Requirements for the runner: | |
| # - The runner must have WSL1 with Ubuntu 24.04 distribution installed. | |
| # - There must be user `runner` created in the WSL as the primary one. | |
| # - This `runner` user must be able to perform `sudo apt` without blocking terminal. | |
| runs-on: [Windows, WSL, ARM64] | |
| defaults: | |
| run: | |
| # Run the job script created by the GitHub Actions runner as a `runner` | |
| # user in WSL. As this script is created on Windows, CRLF characters | |
| # need to be converted to LF and its path translated to WSL format. | |
| shell: wsl --user runner bash --noprofile --norc -euo pipefail "$(s="$(wslpath '{0}')" && sed -i 's/\r$//' "$s" && echo "$s")" | |
| env: | |
| PLATFORM: pc-cygwin | |
| ROOT_PATH: /home/runner | |
| SOURCE_PATH: | |
| BUILD_PATH: | |
| BUILD_PACKAGE_NAME: cygwin-build.tar.gz | |
| TOOLCHAIN_PATH: | |
| TOOLCHAIN_NAME: aarch64-pc-cygwin-msvcrt | |
| TOOLCHAIN_PACKAGE_NAME: aarch64-pc-cygwin-msvcrt-toolchain.tar.gz | |
| 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 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Install zstd | |
| shell: powershell | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Clean previous build | |
| run: | | |
| .github/scripts/delete-build.sh | |
| .github/scripts/delete-code.sh | |
| - name: Install dependencies | |
| run: | | |
| .github/scripts/install-dependencies.sh | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Checkout Cygwin | |
| run: | | |
| .github/scripts/update-sources.sh cygwin | |
| - name: Build Cygwin | |
| run: | | |
| .github/scripts/toolchain/build-cygwin.sh 2 | |
| - name: Execute Cygwin tests | |
| run: | | |
| .github/scripts/toolchain/execute-cygwin-tests.sh | |
| - name: Pack build folder | |
| if: failure() | |
| run: | | |
| .github/scripts/pack-build.sh | |
| - name: Upload build folder | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cygwin-build | |
| retention-days: 1 | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.BUILD_PACKAGE_NAME }} | |
| build-bash: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| PLATFORM: pc-cygwin | |
| TOOLCHAIN_NAME: aarch64-pc-cygwin-msvcrt | |
| TOOLCHAIN_PACKAGE_NAME: aarch64-pc-cygwin-msvcrt-toolchain.tar.gz | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout Bash | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.BASH_REPO }} | |
| ref: ${{ env.BASH_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/bash | |
| - name: Install dependencies | |
| run: | | |
| .github/scripts/install-dependencies.sh | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Build Bash | |
| run: | | |
| .github/scripts/bash/build.sh | |
| build-openblas: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout OpenBLAS | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.OPENBLAS_REPO }} | |
| ref: ${{ env.OPENBLAS_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/openblas | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Build OpenBLAS | |
| run: | | |
| .github/scripts/openblas/build.sh | |
| - name: Pack OpenBLAS tests | |
| run: | | |
| .github/scripts/openblas/pack-tests.sh | |
| - name: Upload tests artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-openblas-tests | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openblas-tests.zip | |
| retention-days: 3 | |
| execute-openblas-tests: | |
| needs: [ | |
| build-toolchain, | |
| build-openblas | |
| ] | |
| runs-on: windows-11-arm | |
| env: | |
| OPENBLAS_TESTS_PATH: ${{ github.workspace }}/openblas-tests | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Install zstd | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Extract cache keys | |
| shell: bash | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} runtime | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ env.runtime-cache-key }} | |
| restore-keys: ${{ env.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Download OpenBLAS tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-openblas-tests | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime | |
| run: | | |
| .github/scripts/toolchain/unpack-runtime.ps1 | |
| - name: Unpack OpenBLAS tests | |
| run: | | |
| .github/scripts/openblas/unpack-tests.ps1 | |
| - name: Execute OpenBLAS tests | |
| shell: bash | |
| run: | | |
| .github/scripts/openblas/execute-tests.sh | |
| build-zlib: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| ZLIB_PATH: ${{ github.workspace }}/zlib | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout zlib | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.ZLIB_REPO }} | |
| ref: ${{ env.ZLIB_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/zlib | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Build zlib | |
| run: | | |
| .github/scripts/zlib/build.sh | |
| - name: Pack zlib | |
| run: | | |
| .github/scripts/zlib/pack.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-zlib | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-zlib.zip | |
| retention-days: 3 | |
| build-libxml2: | |
| needs: [build-toolchain, build-zlib] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| ZLIB_PATH: ${{ github.workspace }}/zlib | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout libxml2 | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.LIBXML2_REPO }} | |
| ref: ${{ env.LIBXML2_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/libxml2 | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Download zlib | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-zlib | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack zlib | |
| run: | | |
| .github/scripts/zlib/unpack.sh | |
| - name: Build libxml2 | |
| run: | | |
| .github/scripts/libxml2/build.sh | |
| - name: Pack libxml2 | |
| run: | | |
| .github/scripts/libxml2/pack.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-libxml2 | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-libxml2.zip | |
| retention-days: 3 | |
| build-openssl: | |
| needs: [build-toolchain, build-zlib] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| ZLIB_PATH: ${{ github.workspace }}/zlib | |
| OPENSSL_PATH: ${{ github.workspace }}/openssl | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout OpenSSL | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.OPENSSL_REPO }} | |
| ref: ${{ env.OPENSSL_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/openssl | |
| - name: Install OpenSSL dependencies | |
| run: | | |
| .github/scripts/openssl/install-dependencies.sh | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Download zlib | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-zlib | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack zlib | |
| run: | | |
| .github/scripts/zlib/unpack.sh | |
| - name: Build OpenSSL | |
| run: | | |
| .github/scripts/openssl/build.sh | |
| - name: Pack OpenSSL | |
| run: | | |
| .github/scripts/openssl/pack.sh | |
| - name: Pack OpenSSL tests | |
| run: | | |
| .github/scripts/openssl/pack-tests.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-openssl | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openssl.zip | |
| retention-days: 3 | |
| - name: Upload tests artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-openssl-tests | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openssl-tests.zip | |
| retention-days: 3 | |
| execute-openssl-tests: | |
| needs: [ | |
| build-toolchain, | |
| build-openssl | |
| ] | |
| runs-on: windows-11-arm | |
| env: | |
| ZLIB_PATH: ${{ github.workspace }}/zlib | |
| OPENSSL_TESTS_PATH: ${{ github.workspace }}/openssl-tests | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout OpenSSL | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.OPENSSL_REPO }} | |
| ref: ${{ env.OPENSSL_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/openssl | |
| - name: Install zstd | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Extract cache keys | |
| shell: bash | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} runtime | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ env.runtime-cache-key }} | |
| restore-keys: ${{ env.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Download OpenSSL tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-openssl-tests | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Download zlib | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-zlib | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime | |
| run: | | |
| .github/scripts/toolchain/unpack-runtime.ps1 | |
| - name: Unpack OpenSSL tests | |
| run: | | |
| .github/scripts/openssl/unpack-tests.ps1 | |
| - name: Unpack zlib | |
| run: | | |
| .github/scripts/zlib/unpack.ps1 | |
| - name: Execute OpenSSL tests | |
| run: | | |
| .github/scripts/openssl/execute-tests.ps1 | |
| build-libjpeg-turbo: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| LIBJPEG_TURBO_PATH: ${{ github.workspace }}/libjpeg-turbo | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout libjpeg-turbo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.LIBJPEG_TURBO_REPO }} | |
| ref: ${{ env.LIBJPEG_TURBO_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/libjpeg-turbo | |
| - name: Patch libjpeg-turbo | |
| run: | | |
| .github/scripts/libjpeg-turbo/patch.sh | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Build libjpeg-turbo | |
| run: | | |
| .github/scripts/libjpeg-turbo/build.sh | |
| - name: Pack libjpeg-turbo | |
| run: | | |
| .github/scripts/libjpeg-turbo/pack.sh | |
| - name: Pack libjpeg-turbo tests | |
| run: | | |
| .github/scripts/libjpeg-turbo/pack-tests.sh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo.zip | |
| retention-days: 3 | |
| - name: Upload tests artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo-tests | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo-tests.zip | |
| retention-days: 3 | |
| execute-libpeg-turbo-tests: | |
| needs: [ | |
| build-toolchain, | |
| build-libjpeg-turbo | |
| ] | |
| runs-on: windows-11-arm | |
| env: | |
| LIBJPEG_TURBO_TESTS_PATH: ${{ github.workspace }}/libjpeg-turbo-tests | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Install zstd | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Extract cache keys | |
| shell: bash | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} runtime | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ env.runtime-cache-key }} | |
| restore-keys: ${{ env.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Download libjpeg-turbo tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo-tests | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime | |
| run: | | |
| .github/scripts/toolchain/unpack-runtime.ps1 | |
| - name: Unpack libjpeg-turbo tests | |
| run: | | |
| .github/scripts/libjpeg-turbo/unpack-tests.ps1 | |
| - name: Execute libjpeg-turbo tests | |
| run: | | |
| .github/scripts/libjpeg-turbo/execute-tests.ps1 | |
| build-ffmpeg: | |
| needs: [build-toolchain] | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| FFMPEG_PATH: ${{ github.workspace }}/ffmpeg | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout FFmpeg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.FFMPEG_REPO }} | |
| ref: ${{ env.FFMPEG_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/ffmpeg | |
| fetch-depth: 0 | |
| - name: Extract cache keys | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} toolchain | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }} | |
| key: ${{ env.toolchain-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Unpack toolchain | |
| run: | | |
| .github/scripts/toolchain/unpack.sh | |
| - name: Patch FFmpeg | |
| run: | | |
| .github/scripts/ffmpeg/patch.sh | |
| - name: Build FFmpeg | |
| run: | | |
| .github/scripts/ffmpeg/build.sh | |
| - name: Pack FFmpeg tests | |
| run: | | |
| .github/scripts/ffmpeg/pack-tests.sh | |
| - name: Upload tests artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests | |
| path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests.zip | |
| retention-days: 3 | |
| execute-ffmpeg-tests: | |
| needs: [ | |
| build-toolchain, | |
| build-ffmpeg | |
| ] | |
| runs-on: windows-11-arm | |
| env: | |
| FFMPEG_TESTS_PATH: ${{ github.workspace }}/ffmpeg-tests | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Checkout FFmpeg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.FFMPEG_REPO }} | |
| ref: ${{ env.FFMPEG_BRANCH }} | |
| path: ${{ env.SOURCE_PATH }}/ffmpeg | |
| fetch-depth: 0 | |
| - name: Install zstd | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Patch FFmpeg | |
| shell: bash | |
| run: | | |
| .github/scripts/ffmpeg/patch.sh | |
| - name: Extract cache keys | |
| shell: bash | |
| run: | | |
| .github/scripts/extract-cache-keys.sh '${{ toJSON(needs.build-toolchain.outputs) }}' | |
| - name: Download ${{ env.TOOLCHAIN_NAME }} runtime | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.RUNTIME_PACKAGE_NAME }} | |
| key: ${{ env.runtime-cache-key }} | |
| restore-keys: ${{ env.runtime-cache-key }} | |
| enableCrossOsArchive: true | |
| fail-on-cache-miss: true | |
| - name: Download FFmpeg tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests | |
| path: ${{ env.ARTIFACT_PATH }} | |
| - name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime | |
| run: | | |
| .github/scripts/toolchain/unpack-runtime.ps1 | |
| - name: Unpack FFmpeg tests | |
| run: | | |
| .github/scripts/ffmpeg/unpack-tests.ps1 | |
| - name: Execute FFmpeg tests | |
| shell: bash | |
| run: | | |
| .github/scripts/ffmpeg/execute-tests.sh |