Skip to content

WIP: Optimize build for testing #1139

WIP: Optimize build for testing

WIP: Optimize build for testing #1139

Workflow file for this run

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: 'main'
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-cache-key:
value: ${{ jobs.build-toolchain.outputs.toolchain-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 || 'main' }}
CYGWIN_PACKAGES_REPO: Windows-on-ARM-Experiments/cygwin-packages
CYGWIN_PACKAGES_BRANCH: ${{ inputs.cygwin_packages_branch || 'main' }}
COCOM_REPO: https://git.code.sf.net/p/cocom/git
COCOM_BRANCH: ${{ inputs.cocom_branch || 'master' }}
OPENBLAS_REPO: OpenMathLib/OpenBLAS.git
OPENBLAS_BRANCH: ${{ inputs.openblas_branch || 'develop' }}
ZLIB_REPO: madler/zlib
ZLIB_BRANCH: 'develop'
LIBXML2_REPO: GNOME/libxml2
LIBXML2_BRANCH: 'master'
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
TOOLCHAIN_PATH: ${{ github.workspace }}/cross
TOOLCHAIN_NAME: aarch64-w64-mingw32-msvcrt
TOOLCHAIN_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-toolchain.tar.gz
SOURCE_PATH: ${{ github.workspace }}/code
BUILD_PATH: ${{ github.workspace }}/build
CCACHE_DIR_PATH: ${{ github.workspace }}/ccache
ARTIFACT_PATH: ${{ github.workspace }}/artifact
CCACHE: 1
DELETE_BUILD: 1
jobs:
build-toolchain:
runs-on: ubuntu-latest
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
- platform: pc-cygwin
arch: aarch64
env:
ARCH: ${{ matrix.arch }}
PLATFORM: ${{ matrix.platform }}
CRT: ${{ matrix.crt }}
PACK_TOOLCHAIN: ${{ matrix.arch == 'aarch64' && matrix.platform == 'w64-mingw32' && matrix.crt == 'msvcrt' }}
TOOLCHAIN_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}
TOOLCHAIN_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.platform }}-${{ matrix.crt }}-toolchain.tar.gz
TESTS_PACKAGE_NAME: ${{ matrix.arch }}-${{ matrix.crt }}-tests.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
fetch-depth: 0
- name: Get workflow SHA
id: workflow-sha
run: |
.github/scripts/get-files-sha.sh ${{ github.workspace }} .github/workflows/advanced.yml
- name: Get binutils SHA
id: binutils-sha
run: |
.github/scripts/get-repository-sha.sh ${{ env.BINUTILS_REPO }} ${{ env.BINUTILS_BRANCH }}
- name: Get GCC SHA
id: gcc-sha
run: |
.github/scripts/get-repository-sha.sh ${{ env.GCC_REPO }} ${{ env.GCC_BRANCH }}
- name: Get MinGW SHA
id: mingw-sha
run: |
.github/scripts/get-repository-sha.sh ${{ env.MINGW_REPO }} ${{ env.MINGW_BRANCH }}
- name: Get binutils scripts SHA
id: binutils-scripts-sha
run: |
.github/scripts/get-files-sha.sh ${{ github.workspace }} .github/scripts/binutils
- name: Get toolchain scripts SHA
id: toolchain-scripts-sha
run: |
.github/scripts/get-files-sha.sh ${{ github.workspace }} .github/scripts/toolchain
- name: Cache toolchain
id: cache-toolchain
uses: actions/cache@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ env.TOOLCHAIN_NAME }}-${{ steps.workflow-sha.outputs.sha }}-${{ steps.binutils-sha.outputs.sha }}-${{ steps.gcc-sha.outputs.sha }}-${{ steps.mingw-sha.outputs.sha }}-${{ steps.binutils-scripts-sha.outputs.sha }}-${{ steps.toolchain-scripts-sha.outputs.sha }}
- 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: ${{ 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: Patch binutils stage1
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }}
run: |
.github/scripts/binutils/patch-cygwin.sh 1
- name: Patch toolchain stage1
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }}
run: |
.github/scripts/toolchain/patch-cygwin.sh 1
- name: Install libraries
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
run: |
.github/scripts/install-libraries.sh
- name: Get cache key
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
id: get-cache-key
run: |
echo "timestamp=$(date -u --iso-8601=seconds)" >> "$GITHUB_OUTPUT"
- name: Restore Ccache
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR_PATH }}
key: advanced-gcc-ccache-${{ steps.get-cache-key.outputs.timestamp }}
restore-keys: advanced-gcc-ccache-
- name: Build binutils
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
run: |
.github/scripts/binutils/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: Patch toolchain stage2
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'pc-cygwin' }}
run: |
.github/scripts/toolchain/patch-cygwin.sh 2
- name: Install libraries
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
run: |
.github/scripts/install-libraries.sh
- 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 != 'pc-linux-gnu' }}
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: advanced-gcc-ccache-${{ steps.get-cache-key.outputs.timestamp }}
- name: Pack toolchain
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }}
run: |
.github/scripts/toolchain/pack.sh
- name: Pack toolchain mock
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN != 'true' }}
run: |
.github/scripts/toolchain/pack-mock.sh
- name: Upload build folder
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && failure() }}
uses: actions/upload-artifact@v4
with:
name: build
retention-days: 1
path: ${{ env.BUILD_PATH }}
- name: Upload artifact
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' || env.PACK_TOOLCHAIN == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.TOOLCHAIN_PACKAGE_NAME }}
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
retention-days: 3
outputs:
toolchain-package-name: ${{ env.PACK_TOOLCHAIN == 'true' && env.TOOLCHAIN_PACKAGE_NAME || '' }}
toolchain-cache-key: ${{ env.PACK_TOOLCHAIN == 'true' && format('{0}-{1}-{2}-{3}-{4}-{5}-{6}', env.TOOLCHAIN_NAME, steps.workflow-sha.outputs.sha, steps.binutils-sha.outputs.sha, steps.gcc-sha.outputs.sha, steps.mingw-sha.outputs.sha, steps.binutils-scripts-sha.outputs.sha, steps.toolchain-scripts-sha.outputs.sha) || '' }}
build-aarch64-tests:
needs: [build-toolchain]
runs-on: ubuntu-latest
env:
TESTS_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-tests.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
fail-on-cache-miss: true
- name: Unpack toolchain
run: |
.github/scripts/toolchain/unpack.sh
- name: Build aarch64-tests
run: |
.github/scripts/tests/build.sh
- name: Pack tests
run: |
tar czf ${{ env.TESTS_PACKAGE_NAME }} -C tests/build/bin/ .
- name: Upload build-aarch64-mingw-tests
uses: actions/upload-artifact@v4
with:
name: ${{ env.TESTS_PACKAGE_NAME }}
path: ${{ env.TESTS_PACKAGE_NAME }}
retention-days: 3
execute-aarch64-tests:
needs: [build-aarch64-tests]
runs-on: [Windows, GCC, ARM64]
env:
TESTS_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-tests.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Download ${{ env.TOOLCHAIN_NAME }} tests
uses: actions/download-artifact@v4
with:
name: ${{ env.TESTS_PACKAGE_NAME }}
path: ${{ env.ARTIFACT_PATH }}
- name: Unpack tests
run: |
tar xzf ${{ env.ARTIFACT_PATH }}\${{ env.TESTS_PACKAGE_NAME }} -C ${{ env.ARTIFACT_PATH }}
- name: Execute ${{ env.TOOLCHAIN_NAME }} tests
run:
.github/scripts/tests/execute-tests.ps1
build-openblas:
needs: [build-toolchain]
runs-on: ubuntu-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-openblas]
runs-on: [Windows, GCC, ARM64]
env:
OPENBLAS_TESTS_PATH: ${{ github.workspace }}/openblas-tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Download OpenBLAS tests
uses: actions/download-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-openblas-tests
path: ${{ env.ARTIFACT_PATH }}
- 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-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-openssl]
runs-on: [Windows, GCC, ARM64]
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: Download OpenSSL tests
uses: actions/download-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-openssl-tests
path: ${{ env.ARTIFACT_PATH }}
- name: Unpack OpenSSL tests
run: |
.github/scripts/openssl/unpack-tests.ps1
- 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.ps1
- name: Execute OpenSSL tests
run: |
.github/scripts/openssl/execute-tests.ps1
build-libjpeg-turbo:
needs: [build-toolchain]
runs-on: ubuntu-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-libjpeg-turbo]
runs-on: [Windows, GCC, ARM64]
env:
LIBJPEG_TURBO_TESTS_PATH: ${{ github.workspace }}/libjpeg-turbo-tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Download libjpeg-turbo tests
uses: actions/download-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-libjpeg-turbo-tests
path: ${{ env.ARTIFACT_PATH }}
- 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-latest
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: Download toolchain
uses: actions/cache/restore@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}
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-ffmpeg]
runs-on: [Windows, GCC, ARM64]
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: Patch FFmpeg
shell: bash
run: |
.github/scripts/ffmpeg/patch.sh
- name: Download FFmpeg tests
uses: actions/download-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests
path: ${{ env.ARTIFACT_PATH }}
- name: Unpack FFmpeg tests
run: |
.github/scripts/ffmpeg/unpack-tests.ps1
- name: Execute FFmpeg tests
shell: bash
run: |
.github/scripts/ffmpeg/execute-tests.sh