diff --git a/.github/scripts/build-binutils.sh b/.github/scripts/build-binutils.sh new file mode 100755 index 000000000..f789dd10d --- /dev/null +++ b/.github/scripts/build-binutils.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-master} + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) +INSTALL_PATH=${INSTALL_PATH:-~/cross} + +export PATH=$INSTALL_PATH/bin:$PATH + +set -e # exit on error +set -x # echo on + +mkdir -p $BUILD_PATH/binutils +cd $BUILD_PATH/binutils + +echo "::group::Configure binutils" +../../code/$BINUTILS_VERSION/configure \ + --prefix=$INSTALL_PATH \ + --target=$TARGET +echo "::endgroup::" + +cd $BUILD_PATH/binutils + +echo "::group::Build binutils" +make $BUILD_MAKE_OPTIONS +echo "::endgroup::" + +echo "::group::Install binutils" +make install +echo "::endgroup::" + +echo 'Success!' diff --git a/.github/scripts/build-gcc-libs.sh b/.github/scripts/build-gcc-libs.sh new file mode 100755 index 000000000..7e3612b71 --- /dev/null +++ b/.github/scripts/build-gcc-libs.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) + +export PATH=$INSTALL_PATH/bin:$PATH + +cd $BUILD_PATH/gcc + +echo "::group::Build libstdc++" +make $BUILD_MAKE_OPTIONS all-target-libstdc++-v3 +echo "::endgroup::" + +echo "::group::Install libstdc++" +make install-target-libstdc++-v3 +echo "::endgroup::" + +echo "::group::Build libgfortran" +make $BUILD_MAKE_OPTIONS all-target-libgfortran +echo "::endgroup::" + +echo "::group::Install libgfortran" +make install-target-libgfortran +echo "::endgroup::" + +echo "::group::Build remaining GCC libraries" +make $BUILD_MAKE_OPTIONS all +echo "::endgroup::" + +echo "::group::Install remaining GCC libraries" +make install +echo "::endgroup::" diff --git a/.github/scripts/build-gcc.sh b/.github/scripts/build-gcc.sh new file mode 100755 index 000000000..31ae1301c --- /dev/null +++ b/.github/scripts/build-gcc.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +GCC_VERSION=${GCC_VERSION:-gcc-master} + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) +INSTALL_PATH=${INSTALL_PATH:-~/cross} + +export PATH=$INSTALL_PATH/bin:$PATH + +set -e # exit on error +set -x # echo on + +mkdir -p $BUILD_PATH/gcc + +cd $BUILD_PATH/gcc + +echo "::group::Configure GCC" +# REMOVED --libexecdir=/opt/lib +# REMOVED --with-{gmp,mpfr,mpc,isl}=/usr +../../code/$GCC_VERSION/configure \ + --prefix=$INSTALL_PATH \ + --target=$TARGET \ + --enable-languages=c,lto,c++,fortran \ + --enable-shared \ + --enable-static \ + --enable-threads=win32 \ + --enable-graphite \ + --enable-fully-dynamic-string \ + --enable-libstdcxx-filesystem-ts=yes \ + --enable-libstdcxx-time=yes \ + --enable-cloog-backend=isl \ + --enable-version-specific-runtime-libs \ + --enable-lto \ + --enable-libgomp \ + --enable-checking=release \ + --disable-multilib \ + --disable-shared \ + --disable-rpath \ + --disable-win32-registry \ + --disable-werror \ + --disable-symvers \ + --disable-libstdcxx-pch \ + --disable-libstdcxx-debug \ + --disable-isl-version-check \ + --disable-bootstrap \ + --with-libiconv \ + --with-system-zlib \ + --with-gnu-as \ + --with-gnu-ld +echo "::endgroup::" + +cd $BUILD_PATH/gcc + +echo "::group::Build GCC" +make $BUILD_MAKE_OPTIONS all-gcc +echo "::endgroup::" + +echo "::group::Install GCC" +make install-gcc +echo "::endgroup::" + +echo 'Success!' diff --git a/.github/scripts/build-libgcc.sh b/.github/scripts/build-libgcc.sh new file mode 100755 index 000000000..9345d9ec2 --- /dev/null +++ b/.github/scripts/build-libgcc.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) + +export PATH=$INSTALL_PATH/bin:$PATH + +cd $BUILD_PATH/gcc + +echo "::group::Build libgcc" +make $BUILD_MAKE_OPTIONS all-target-libgcc +echo "::endgroup::" + +echo "::group::Install libgcc" +make install-target-libgcc +echo "::endgroup::" diff --git a/.github/scripts/build-mingw-crt.sh b/.github/scripts/build-mingw-crt.sh new file mode 100755 index 000000000..5307c5e84 --- /dev/null +++ b/.github/scripts/build-mingw-crt.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +MINGW_VERSION=${MINGW_VERSION:-mingw-w64-master} + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) +INSTALL_PATH=${INSTALL_PATH:-~/cross} + +export PATH=$INSTALL_PATH/bin:$PATH + +set -e # exit on error +set -x # echo on + +mkdir -p $BUILD_PATH/mingw +cd $BUILD_PATH/mingw + +echo "::group::Configure MinGW CRT" +../../code/$MINGW_VERSION/mingw-w64-crt/configure \ + --prefix=$INSTALL_PATH/$TARGET \ + --build=x86_64-linux-gnu \ + --host=$TARGET \ + --with-sysroot=$INSTALL_PATH \ + --enable-libarm64 \ + --disable-lib32 \ + --disable-lib64 \ + --disable-libarm32 \ + --disable-shared \ + --with-default-msvcrt=msvcrt +echo "::endgroup::" + +cd $BUILD_PATH/mingw + +echo "::group::Build MinGW headers" +make $BUILD_MAKE_OPTIONS +echo "::endgroup::" + +echo "::group::Install MinGW headers" +make install +echo "::endgroup::" + +echo 'Success!' diff --git a/.github/scripts/build-mingw-headers.sh b/.github/scripts/build-mingw-headers.sh new file mode 100755 index 000000000..249fb8860 --- /dev/null +++ b/.github/scripts/build-mingw-headers.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +MINGW_VERSION=${MINGW_VERSION:-mingw-w64-master} + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) +INSTALL_PATH=${INSTALL_PATH:-~/cross} + +export PATH=$INSTALL_PATH/bin:$PATH + +set -e # exit on error +set -x # echo on + +mkdir -p $BUILD_PATH/mingw-headers +cd $BUILD_PATH/mingw-headers + +echo "::group::Configure MinGW headers" +../../code/$MINGW_VERSION/mingw-w64-headers/configure \ + --prefix=$INSTALL_PATH/$TARGET \ + --host=$TARGET \ + --with-default-msvcrt=msvcrt +echo "::endgroup::" + +cd $BUILD_PATH/mingw-headers + +echo "::group::Build MinGW headers" +make $BUILD_MAKE_OPTIONS +echo "::endgroup::" + +echo "::group::Install MinGW headers" +make install +echo "::endgroup::" + +# Symlink for gcc +ln -sf $INSTALL_PATH/$TARGET $INSTALL_PATH/mingw + +echo 'Success!' diff --git a/.github/scripts/build-mingw.sh b/.github/scripts/build-mingw.sh new file mode 100755 index 000000000..73c190ee8 --- /dev/null +++ b/.github/scripts/build-mingw.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +MINGW_VERSION=${MINGW_VERSION:-mingw-w64-master} + +TARGET=${TARGET:-aarch64-w64-mingw32} +BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET} +BUILD_MAKE_OPTIONS=-j$(nproc) +INSTALL_PATH=${INSTALL_PATH:-~/cross} + +export PATH=$INSTALL_PATH/bin:$PATH + +set -e # exit on error +set -x # echo on + +cd $BUILD_PATH/mingw + +echo "::group::Configure MinGW libraries" +../../code/$MINGW_VERSION/configure \ + --prefix=$INSTALL_PATH/$TARGET \ + --host=$TARGET \ + --enable-libarm64 \ + --disable-lib32 \ + --disable-lib64 \ + --disable-libarm32 \ + --disable-shared \ + --with-libraries=libmangle,pseh,winpthreads \ + --with-default-msvcrt=msvcrt + +echo "::endgroup::" + +cd $BUILD_PATH/mingw + +echo "::group::Build MinGW" +make $BUILD_MAKE_OPTIONS +echo "::endgroup::" + +echo "::group::Install MinGW" +make install +echo "::endgroup::" diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 5625b03bd..77db24710 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -1,320 +1,17 @@ -#! /bin/bash -set -e - -#------------------------------------------------------------------------------------------- -# This WIP script will download packages for, configure, -# build and install a Windows on ARM64 GCC cross-compiler. -# See: http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler -#------------------------------------------------------------------------------------------- - -BINUTILS_REPO=https://github.com/ZacWalk/binutils-woarm64.git -BINUTILS_BRANCH=${BINUTILS_BRANCH:-woarm64} -# BINUTILS_VERSION=binutils-2.40 -BINUTILS_VERSION=binutils-master - -GCC_REPO=https://github.com/ZacWalk/gcc-woarm64.git -GCC_BRANCH=${GCC_BRANCH:-woarm64} -# GCC_VERSION=gcc-12.2.0 -GCC_VERSION=gcc-master - -MINGW_REPO=https://github.com/ZacWalk/mingw-woarm64.git -MINGW_BRANCH=${MINGW_BRANCH:-woarm64} -MINGW_VERSION=mingw-w64-master - -# TARGET_ARCH=x86_64 -TARGET_ARCH=aarch64 -INSTALL_PATH=${INSTALL_PATH:-~/cross} -RUN_DOWNLOAD=1 -RUN_CONFIG=1 -TARGET=$TARGET_ARCH-w64-mingw32 -# TARGET=$TARGET_ARCH-pc-cygwin -BUILD_DIR=build-$TARGET -PARALLEL_MAKE=-j6 -MPFR_VERSION=mpfr-4.1.0 -GMP_VERSION=gmp-6.2.1 -MPC_VERSION=mpc-1.2.1 -ISL_VERSION=isl-0.24 -NEWLIB_VERSION=newlib-4.1.0 -WGET_OPTIONS="-nc -P downloads" - -export PATH=$INSTALL_PATH/bin:$PATH - -make_folders() -{ - echo "::group::Make folders" - mkdir -p code - mkdir -p $BUILD_DIR - mkdir -p $BUILD_DIR/binutils - mkdir -p $BUILD_DIR/gcc - mkdir -p $BUILD_DIR/mingw-headers - mkdir -p $BUILD_DIR/mingw - echo "::endgroup::" -} - -download_sources() -{ - echo "::group::Download sources" - # Download packages - # wget $WGET_OPTIONS https://ftp.gnu.org/gnu/binutils/$BINUTILS_VERSION.tar.gz - # wget $WGET_OPTIONS https://ftp.gnu.org/gnu/gcc/$GCC_VERSION/$GCC_VERSION.tar.gz - - wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$MPFR_VERSION.tar.bz2 - wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$GMP_VERSION.tar.bz2 - wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$MPC_VERSION.tar.gz - wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$ISL_VERSION.tar.bz2 - - # Extract everything - cd code - for f in ../downloads/*.tar*; do tar xf $f --skip-old-files; done - - # update or clone repos - git -C "$BINUTILS_VERSION" pull || git clone "$BINUTILS_REPO" -b "$BINUTILS_BRANCH" "$BINUTILS_VERSION" - git -C "$GCC_VERSION" pull || git clone "$GCC_REPO" -b "$GCC_BRANCH" "$GCC_VERSION" - git -C "$MINGW_VERSION" pull || git clone "$MINGW_REPO" -b "$MINGW_BRANCH" "$MINGW_VERSION" - - # Symbolic links for deps - cd $GCC_VERSION - ln -sf `ls -1d ../mpfr-*/` mpfr - ln -sf `ls -1d ../gmp-*/` gmp - ln -sf `ls -1d ../mpc-*/` mpc - ln -sf `ls -1d ../isl-*/` isl - cd ../.. - echo "::endgroup::" -} - -config_binutils() -{ - echo "::group::Configure binutils" - cd $BUILD_DIR/binutils - ../../code/$BINUTILS_VERSION/configure \ - --prefix=$INSTALL_PATH \ - --target=$TARGET - cd ../.. - echo "::endgroup::" -} - -build_binutils() -{ - echo "::group::Build binutils" - cd $BUILD_DIR/binutils - make $PARALLEL_MAKE - make install - cd ../.. - echo "::endgroup::" -} - -config_gcc_compiler() -{ - echo "::group::Configure GCC" - cd $BUILD_DIR/gcc - # REMOVED --libexecdir=/opt/lib - # REMOVED --with-{gmp,mpfr,mpc,isl}=/usr - ../../code/$GCC_VERSION/configure \ - --prefix=$INSTALL_PATH \ - --target=$TARGET \ - --enable-languages=c,lto,c++,fortran \ - --enable-shared \ - --enable-static \ - --enable-threads=win32 \ - --enable-graphite \ - --enable-fully-dynamic-string \ - --enable-libstdcxx-filesystem-ts=yes \ - --enable-libstdcxx-time=yes \ - --enable-cloog-backend=isl \ - --enable-version-specific-runtime-libs \ - --enable-lto \ - --enable-libgomp \ - --enable-checking=release \ - --disable-multilib \ - --disable-shared \ - --disable-rpath \ - --disable-win32-registry \ - --disable-werror \ - --disable-symvers \ - --disable-libstdcxx-pch \ - --disable-libstdcxx-debug \ - --disable-isl-version-check \ - --disable-bootstrap \ - --with-libiconv \ - --with-system-zlib \ - --with-gnu-as \ - --with-gnu-ld - cd ../.. - echo "::endgroup::" -} - -build_gcc_compiler() -{ - echo "::group::Build GCC" - cd $BUILD_DIR/gcc - make $PARALLEL_MAKE all-gcc - make install-gcc - cd ../.. - echo "::endgroup::" -} - -config_mingw_headers() -{ - echo "::group::Configure MinGW headers" - cd $BUILD_DIR/mingw-headers - ../../code/$MINGW_VERSION/mingw-w64-headers/configure \ - --prefix=$INSTALL_PATH/$TARGET \ - --host=$TARGET \ - --with-default-msvcrt=msvcrt - cd ../.. - echo "::endgroup::" -} - -build_mingw_headers() -{ - echo "::group::Build MinGW headers" - cd $BUILD_DIR/mingw-headers - make - make install - cd ../.. - # Symlink for gcc - ln -sf $INSTALL_PATH/$TARGET $INSTALL_PATH/mingw - echo "::endgroup::" -} - -config_mingw_crt() -{ - echo "::group::Configure MinGW CRT" - cd $BUILD_DIR/mingw - ../../code/$MINGW_VERSION/mingw-w64-crt/configure \ - --build=x86_64-linux-gnu \ - --with-sysroot=$INSTALL_PATH \ - --prefix=$INSTALL_PATH/$TARGET \ - --host=$TARGET \ - --enable-libarm64 \ - --disable-lib32 \ - --disable-lib64 \ - --disable-libarm32 \ - --disable-shared \ - --with-default-msvcrt=msvcrt - cd ../.. - echo "::endgroup::" -} - -build_mingw_crt() -{ - echo "::group::Build MinGW CRT" - cd $BUILD_DIR/mingw - make $PARALLEL_MAKE - make install - cd ../.. - echo "::endgroup::" -} - -config_mingw_libs() -{ - echo "::group::Configure MinGW libraries" - cd $BUILD_DIR/mingw - ../../code/$MINGW_VERSION/configure \ - --prefix=$INSTALL_PATH/$TARGET \ - --host=$TARGET \ - --enable-libarm64 \ - --disable-lib32 \ - --disable-lib64 \ - --disable-libarm32 \ - --disable-shared \ - --with-libraries=libmangle,pseh,winpthreads \ - --with-default-msvcrt=msvcrt - cd ../.. - echo "::endgroup::" -} - -build_mingw_libs() -{ - echo "::group::Build MinGW libraries" - cd $BUILD_DIR/mingw - make - make install - cd ../.. - echo "::endgroup::" -} - -build_libgcc() -{ - echo "::group::Build libgcc" - cd $BUILD_DIR/gcc - make $PARALLEL_MAKE all-target-libgcc - make install-target-libgcc - cd ../.. - echo "::endgroup::" -} - -build_libstdcpp() -{ - echo "::group::Build libstdcpp" - cd $BUILD_DIR/gcc - make $PARALLEL_MAKE all-target-libstdc++-v3 - make install-target-libstdc++-v3 - cd ../.. - echo "::endgroup::" -} - -build_libgfortran() -{ - echo "::group::Build libgfortran" - cd $BUILD_DIR/gcc - make $PARALLEL_MAKE all-target-libgfortran - make install-target-libgfortran - cd ../.. - echo "::endgroup::" -} - -build_gcc_remaining() -{ - echo "::group::Build remaining" - cd $BUILD_DIR/gcc - make $PARALLEL_MAKE all - make install - cd ../.. - echo "::endgroup::" -} +#!/bin/bash +set -e # exit on error set -x # echo on -for var in "$@" -do - if [ "$var" = "q" ] || [ "$var" = "quick" ] ; then - RUN_CONFIG=0 - RUN_DOWNLOAD=0 - echo " ==== quick build" - fi -done - -make_folders - -if [ $RUN_DOWNLOAD = 1 ] ; then - download_sources -fi - -if [ $RUN_CONFIG = 1 ] ; then - config_binutils - config_gcc_compiler - config_mingw_headers -fi - -build_binutils -build_gcc_compiler -build_mingw_headers - -if [ $RUN_CONFIG = 1 ] ; then - config_mingw_crt -fi - -build_mingw_crt -build_libgcc - -if [ $RUN_CONFIG = 1 ] ; then - config_mingw_libs -fi +TARGET=${TARGET:-aarch64-w64-mingw32} +INSTALL_PATH=${INSTALL_PATH:-~/cross} -build_mingw_libs -build_libstdcpp -build_libgfortran -build_gcc_remaining +.github/scripts/build-binutils.sh +.github/scripts/build-mingw-headers.sh +.github/scripts/build-gcc.sh +.github/scripts/build-mingw-crt.sh +.github/scripts/build-libgcc.sh +.github/scripts/build-mingw.sh +.github/scripts/build-gcc-libs.sh echo 'Success!' diff --git a/.github/scripts/install-dependencies.sh b/.github/scripts/install-dependencies.sh index 97085b1d5..9da4a584a 100755 --- a/.github/scripts/install-dependencies.sh +++ b/.github/scripts/install-dependencies.sh @@ -1,4 +1,5 @@ -#! /bin/bash +#!/bin/bash + set -e # stop at first error set -x # echo on diff --git a/.github/scripts/install-libraries.sh b/.github/scripts/install-libraries.sh new file mode 100755 index 000000000..57077457f --- /dev/null +++ b/.github/scripts/install-libraries.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-master} +GCC_VERSION=${GCC_VERSION:-gcc-master} + +CODE_PATH=${CODE_PATH:-$PWD/code} +MPFR_VERSION=mpfr-4.1.0 +GMP_VERSION=gmp-6.2.1 +MPC_VERSION=mpc-1.2.1 +ISL_VERSION=isl-0.24 +WGET_OPTIONS="-nc -P downloads" + +set -e # exit on error +set -x # echo on + +echo "::group::Install libraries" + +# Download packages +wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$MPFR_VERSION.tar.bz2 +wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$GMP_VERSION.tar.bz2 +wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$MPC_VERSION.tar.gz +wget $WGET_OPTIONS https://gcc.gnu.org/pub/gcc/infrastructure/$ISL_VERSION.tar.bz2 + +# Extract everything +cd $CODE_PATH +for f in ../downloads/*.tar*; do tar xf $f --skip-old-files; done + +# Symbolic links for binutils dependencies +cd $CODE_PATH/$BINUTILS_VERSION +ln -sf `ls -1d ../mpfr-*/` mpfr +ln -sf `ls -1d ../gmp-*/` gmp +ln -sf `ls -1d ../mpc-*/` mpc +ln -sf `ls -1d ../isl-*/` isl + +# Symbolic links for GCC dependencies +cd $CODE_PATH/$GCC_VERSION +ln -sf `ls -1d ../mpfr-*/` mpfr +ln -sf `ls -1d ../gmp-*/` gmp +ln -sf `ls -1d ../mpc-*/` mpc +ln -sf `ls -1d ../isl-*/` isl + +echo "::endgroup::" + +echo 'Success!' diff --git a/.github/workflows/advanced.yml b/.github/workflows/advanced.yml index 9e4dff554..185009788 100644 --- a/.github/workflows/advanced.yml +++ b/.github/workflows/advanced.yml @@ -21,33 +21,90 @@ on: description: 'Mingw branch to build' required: false default: 'woarm64' -env: - BINUTILS_BRANCH: ${{ github.event.inputs.binutils_branch }} - GCC_BRANCH: ${{ github.event.inputs.gcc_branch }} - MINGW_BRANCH: ${{ github.event.inputs.mingw_branch }} jobs: - run-script: + build-toolchain: runs-on: ubuntu-latest 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: aarch64-w64-mingw32 INSTALL_PATH: ${{ github.workspace }}/cross steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + path: ${{ github.workspace }} - - name: Install Dependencies + - 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: Run Build + - 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.sh + .github/scripts/build-gcc-libs.sh - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: aarch64-w64-mingw32-toolchain + name: ${{ env.TARGET }}-toolchain path: ${{ env.INSTALL_PATH }} retention-days: 1