Skip to content

Upstreaming changes to the main repo #73

Upstreaming changes to the main repo

Upstreaming changes to the main repo #73

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'
env:
TOOLCHAIN_PATH: ${{ github.workspace }}/cross
jobs:
build-toolchain:
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64-w64-mingw32, x86_64-w64-mingw32]
crt: [msvcrt, ucrt]
env:
BINUTILS_REPO: ZacWalk/binutils-woarm64
BINUTILS_BRANCH: ${{ github.event.inputs.binutils_branch }}
BINUTILS_VERSION: binutils-master
GCC_REPO: ZacWalk/gcc-woarm64
GCC_BRANCH: ${{ github.event.inputs.gcc_branch }}
GCC_VERSION: gcc-master
MINGW_REPO: ZacWalk/mingw-woarm64
MINGW_BRANCH: ${{ github.event.inputs.mingw_branch }}
MINGW_VERSION: mingw-w64-master
TARGET: ${{ matrix.target }}
CRT: ${{ matrix.crt }}
TOOLCHAIN_PACKAGE_NAME: ${{ matrix.target }}-${{ matrix.crt }}-toolchain.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout binutils
uses: actions/checkout@v4
with:
repository: ${{ env.BINUTILS_REPO }}
ref: ${{ env.BINUTILS_BRANCH }}
path: ${{ github.workspace }}/code/${{ env.BINUTILS_VERSION }}
- name: Checkout GCC
uses: actions/checkout@v4
with:
repository: ${{ env.GCC_REPO }}
ref: ${{ env.GCC_BRANCH }}
path: ${{ github.workspace }}/code/${{ env.GCC_VERSION }}
- name: Checkout MinGW
uses: actions/checkout@v4
with:
repository: ${{ env.MINGW_REPO }}
ref: ${{ env.MINGW_BRANCH }}
path: ${{ github.workspace }}/code/${{ env.MINGW_VERSION }}
- name: Install dependencies
run: |
.github/scripts/install-dependencies.sh
- name: Install libraries
run: |
.github/scripts/install-libraries.sh
- name: Build binutils
run: |
.github/scripts/build-binutils.sh
- name: Build MinGW headers
run: |
.github/scripts/build-mingw-headers.sh
- name: Build GCC
run: |
.github/scripts/build-gcc.sh
- name: Build MinGW CRT
run: |
.github/scripts/build-mingw-crt.sh
- name: Build libgcc
run: |
.github/scripts/build-libgcc.sh
- name: Build MinGW
run: |
.github/scripts/build-mingw.sh
- name: Build GCC libs
run: |
.github/scripts/build-gcc-libs.sh
- name: Pack toolchain
run: |
.github/scripts/pack-toolchain.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.TOOLCHAIN_PACKAGE_NAME }}
path: ${{ github.workspace }}/${{ env.TOOLCHAIN_PACKAGE_NAME }}
retention-days: 1
build-aarch64-tests:
needs: [build-toolchain]
runs-on: ubuntu-latest
env:
TARGET: aarch64-w64-mingw32
TOOLCHAIN_PACKAGE_NAME: aarch64-w64-mingw32-msvcrt-toolchain.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Download toolchain
uses: actions/download-artifact@v3
with:
name: ${{ env.TOOLCHAIN_PACKAGE_NAME }}
path: ${{ github.workspace }}
- name: Unpack toolchain
run: |
.github/scripts/unpack-toolchain.sh
- name: Build aarch64-tests
run: |
.github/scripts/build-aarch64-tests.sh
- name: Upload build-aarch64-mingw-tests
uses: actions/upload-artifact@v3
with:
name: aarch64-w64-mingw32-msvcrt-tests
path: tests/build/bin/aarch64-mingw-tests.exe
retention-days: 3
execute-aarch64-tests:
needs: [build-aarch64-tests]
runs-on: [Windows, GCC, ARM64]
steps:
- name: Download build-aarch64-mingw-tests
uses: actions/download-artifact@v3
with:
name: aarch64-w64-mingw32-msvcrt-tests
- name: Execute aarch64-mingw-tests
run:
${{ github.workspace }}\aarch64-mingw-tests.exe