Skip to content

Commit

Permalink
Split andvanced workflow into separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Nov 7, 2023
1 parent b9250c8 commit 237be41
Show file tree
Hide file tree
Showing 12 changed files with 367 additions and 325 deletions.
34 changes: 34 additions & 0 deletions .github/scripts/build-binutils.sh
Original file line number Diff line number Diff line change
@@ -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!'
15 changes: 15 additions & 0 deletions .github/scripts/build-gcc-libs.sh
Original file line number Diff line number Diff line change
@@ -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::"
63 changes: 63 additions & 0 deletions .github/scripts/build-gcc.sh
Original file line number Diff line number Diff line change
@@ -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!'
15 changes: 15 additions & 0 deletions .github/scripts/build-libgcc.sh
Original file line number Diff line number Diff line change
@@ -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::"
42 changes: 42 additions & 0 deletions .github/scripts/build-mingw-crt.sh
Original file line number Diff line number Diff line change
@@ -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!'
38 changes: 38 additions & 0 deletions .github/scripts/build-mingw-headers.sh
Original file line number Diff line number Diff line change
@@ -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!'
37 changes: 37 additions & 0 deletions .github/scripts/build-mingw.sh
Original file line number Diff line number Diff line change
@@ -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::"
Loading

0 comments on commit 237be41

Please sign in to comment.