From 237be4171e090a3ab282c3096332458290d8f43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Barto=C5=88?= Date: Mon, 6 Nov 2023 10:23:21 +0100 Subject: [PATCH] Split andvanced workflow into separate jobs --- .github/scripts/build-binutils.sh | 34 +++ .github/scripts/build-gcc-libs.sh | 15 ++ .github/scripts/build-gcc.sh | 63 +++++ .github/scripts/build-libgcc.sh | 15 ++ .github/scripts/build-mingw-crt.sh | 42 +++ .github/scripts/build-mingw-headers.sh | 38 +++ .github/scripts/build-mingw.sh | 37 +++ .github/scripts/build.sh | 324 +----------------------- .github/scripts/install-dependencies.sh | 3 +- .github/scripts/install-libraries.sh | 43 ++++ .github/workflows/advanced.yml | 76 +++++- .gitignore | 2 +- 12 files changed, 367 insertions(+), 325 deletions(-) create mode 100755 .github/scripts/build-binutils.sh create mode 100755 .github/scripts/build-gcc-libs.sh create mode 100755 .github/scripts/build-gcc.sh create mode 100755 .github/scripts/build-libgcc.sh create mode 100755 .github/scripts/build-mingw-crt.sh create mode 100755 .github/scripts/build-mingw-headers.sh create mode 100755 .github/scripts/build-mingw.sh create mode 100755 .github/scripts/install-libraries.sh diff --git a/.github/scripts/build-binutils.sh b/.github/scripts/build-binutils.sh new file mode 100755 index 000000000..c5a67619b --- /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 + +echo "::group::Configure binutils" + +mkdir -p $BUILD_PATH/binutils + +cd $BUILD_PATH/binutils +../../code/$BINUTILS_VERSION/configure \ + --prefix=$INSTALL_PATH \ + --target=$TARGET + +echo "::endgroup::" + +echo "::group::Build binutils" + +cd $BUILD_PATH/binutils +make $BUILD_MAKE_OPTIONS +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..b5faf1ee2 --- /dev/null +++ b/.github/scripts/build-gcc-libs.sh @@ -0,0 +1,15 @@ +#!/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 + +echo "::group::GCC libraries" + +cd $BUILD_PATH/gcc +make $BUILD_MAKE_OPTIONS +make install + +echo "::endgroup::" diff --git a/.github/scripts/build-gcc.sh b/.github/scripts/build-gcc.sh new file mode 100755 index 000000000..fc97a89a9 --- /dev/null +++ b/.github/scripts/build-gcc.sh @@ -0,0 +1,63 @@ +#!/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 + +echo "::group::Configure GCC" + +mkdir -p $BUILD_PATH/gcc + +cd $BUILD_PATH/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::" + +echo "::group::Build GCC" + +cd $BUILD_PATH/gcc +make $BUILD_MAKE_OPTIONS all-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..807b5c305 --- /dev/null +++ b/.github/scripts/build-libgcc.sh @@ -0,0 +1,15 @@ +#!/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 + +echo "::group::Build libgcc" + +cd $BUILD_PATH/gcc +make $BUILD_MAKE_OPTIONS all-target-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..ef4655284 --- /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 + +echo "::group::Configure MinGW CRT" + +mkdir -p $BUILD_PATH/mingw + +cd $BUILD_PATH/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 + +echo "::endgroup::" + +echo "::group::Build MinGW headers" + +cd $BUILD_PATH/mingw +make $BUILD_MAKE_OPTIONS +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..2f60e3ea7 --- /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 + +echo "::group::Configure MinGW headers" + +mkdir -p $BUILD_PATH/mingw-headers + +cd $BUILD_PATH/mingw-headers +../../code/$MINGW_VERSION/mingw-w64-headers/configure \ + --prefix=$INSTALL_PATH/$TARGET \ + --host=$TARGET \ + --with-default-msvcrt=msvcrt + +echo "::endgroup::" + +echo "::group::Build MinGW headers" + +cd $BUILD_PATH/mingw-headers +make $BUILD_MAKE_OPTIONS +make install + +# Symlink for gcc +ln -sf $INSTALL_PATH/$TARGET $INSTALL_PATH/mingw + +echo "::endgroup::" + +echo 'Success!' diff --git a/.github/scripts/build-mingw.sh b/.github/scripts/build-mingw.sh new file mode 100755 index 000000000..86cac34e7 --- /dev/null +++ b/.github/scripts/build-mingw.sh @@ -0,0 +1,37 @@ +#!/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 + +echo "::group::Configure MinGW libraries" + +cd $BUILD_PATH/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 + +echo "::endgroup::" + +echo "::group::Build MinGW" + +cd $BUILD_PATH/mingw +make $BUILD_MAKE_OPTIONS +make install + +echo "::endgroup::" diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 5625b03bd..0edbecc64 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -1,320 +1,14 @@ -#! /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 - -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..fbf1176b6 --- /dev/null +++ b/.github/scripts/install-libraries.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-master} +GCC_VERSION=${GCC_VERSION:-gcc-master} + +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 $GITHUB_WORKSPACE/code +for f in ../downloads/*.tar*; do tar xf $f --skip-old-files; done + +# Symbolic links for binutils dependencies +cd $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 $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 7fed0c110..e5b4aada3 100644 --- a/.github/workflows/advanced.yml +++ b/.github/workflows/advanced.yml @@ -18,26 +18,86 @@ 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: + strategy: + matrix: + target: [aarch64-w64-mingw32] + crt: [msvcrt] + runs-on: ubuntu-latest env: + BINUTILS_REPO: https://github.com/ZacWalk/binutils-woarm64.git + BINUTILS_BRANCH: ${{ github.event.inputs.binutils_branch }} + BINUTILS_VERSION: binutils-master + GCC_REPO: https://github.com/ZacWalk/gcc-woarm64.git + GCC_BRANCH: ${{ github.event.inputs.gcc_branch }} + GCC_VERSION: gcc-master + MINGW_REPO: https://github.com/ZacWalk/mingw-woarm64.git + MINGW_BRANCH: ${{ github.event.inputs.mingw_branch }} + MINGW_VERSION: mingw-w64-master + TARGET: ${{ matrix.target }} INSTALL_PATH: ${{ github.workspace }}/cross steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Dependencies run: | .github/scripts/install-dependencies.sh - - name: Run Build + - name: Install libraries + run: | + .github/scripts/install-libraries.sh + + - 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: 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 diff --git a/.gitignore b/.gitignore index 994bc6449..ba09a64ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .vscode/ -build-aarch64-w64-mingw32/ +build-*/ code/ downloads/ *.exe