crosstool-ng/.github/workflows/continuous-integration-workflow.yml
Chris Packham 0630e41d69 CI: build sh-unknown-elf instead of sh-multilib-linux-gnu
sh-multilib-linux-gnu ends up building 8 different libcs. This seems to
be problematic for the github hosted runners as it appears to run them
out of disk space (anecdotally this seems to have gotten worse with the
switch from ubuntu-18.04 to ubuntu-20.04).

Build sh-unknown-elf instead to make sure we cover of the sh
architecture to some degree.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-03-25 16:16:25 +13:00

138 lines
4.6 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
crosstool:
runs-on: ${{ matrix.host }}
strategy:
matrix:
host: [
"ubuntu-latest",
"macos-10.15",
]
steps:
- name: "clone"
uses: actions/checkout@v2
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y gperf help2man libtool-bin
- name: "prereq macOS"
if: ${{ runner.os == 'macOS' }}
run: |
brew install autoconf automake bash binutils gawk gnu-sed \
gnu-tar help2man ncurses
- name: "build ct-ng"
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
export PATH="$PATH:/usr/local/opt/binutils/bin"
export CPPFLAGS="-I/usr/local/opt/ncurses/include -I/usr/local/opt/gettext/include"
export LDFLAGS="-L/usr/local/opt/ncurses/lib -L/usr/local/opt/gettext/lib"
fi
./bootstrap
./configure --prefix=$PWD/.local/
make
make install
tar -cf ct-ng.tar .local/
- name: "upload ct-ng"
uses: actions/upload-artifact@v2
with:
name: crosstool.${{ matrix.host }}
path: ct-ng.tar
- name: "upload config.log"
uses: actions/upload-artifact@v2
with:
name: config.log.${{ matrix.host }}
path: config.log
if: ${{ always() }}
toolchains:
needs: crosstool
runs-on: ${{ matrix.host }}
strategy:
matrix:
host: [
"ubuntu-latest",
"macos-10.15",
]
sample: [
"aarch64-unknown-linux-gnu",
"arc-multilib-elf32",
"arc-multilib-linux-gnu",
"arc-multilib-linux-uclibc",
"arm-picolibc-eabi",
"arm-unknown-linux-gnueabi",
"arm-unknown-linux-musleabi",
"armv6-nommu-linux-uclibcgnueabi",
"mips-unknown-elf",
"mips64-unknown-linux-gnu",
"powerpc-unknown-linux-gnu",
"powerpc64-unknown-linux-gnu",
"riscv32-unknown-elf",
"riscv64-unknown-elf",
"s390-unknown-linux-gnu",
"sh-unknown-elf",
"sparc-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
"x86_64-multilib-linux-uclibc",
"xtensa-fsf-linux-uclibc"
]
exclude:
# Exclude both glibc & uClibc ARC Linux toolchains as
# there's no known use of ARC Linux toolchains on Mac,
# and anyway glibc fails to build for ARC700,
# see https://github.com/crosstool-ng/crosstool-ng/pull/1456#issuecomment-779150246
- {host: "macos-10.15", sample: "arc-multilib-linux-gnu"}
- {host: "macos-10.15", sample: "arc-multilib-linux-uclibc"}
# Exclude mips64-*-linux-gnu because of <byteswap.h> usage in
# elf-entry.c for linux kernel headers. <byteswap.h> is a GNU
# extension and doesn't exist on MacOS X
- {host: "macos-10.15", sample: "mips64-unknown-linux-gnu"}
steps:
- name: Create case sensitive workspace volume for macOS
if: ${{ runner.os == 'macOS' }}
run: |
cd ..
rmdir crosstool-ng
hdiutil create ${HOME}/Workspace.sparseimage -volname crosstool-ng -type SPARSE -size 20g -fs HFSX
hdiutil mount ${HOME}/Workspace.sparseimage -mountroot /Users/runner/work/crosstool-ng
cd crosstool-ng
- name: "download ct-ng"
uses: actions/download-artifact@v2
with:
name: crosstool.${{ matrix.host }}
- name: "extract ct-ng"
run: |
tar -xf ct-ng.tar
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y gperf help2man libtool-bin
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: "prereq macOS"
if: ${{ runner.os == 'macOS' }}
run: |
brew install autoconf automake bash binutils gawk gnu-sed \
gnu-tar help2man ncurses pkg-config
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: "build ${{ matrix.sample }} for ${{ matrix.host }}"
run: |
mkdir -p src
ct-ng ${{ matrix.sample }}
sed -i -e '/CT_LOG_PROGRESS_BAR/s/y$/n/' .config
sed -i -e '/CT_LOCAL_TARBALLS_DIR/s/HOME/CT_TOP_DIR/' .config
sed -i -e '/CT_PREFIX_DIR/s/HOME/CT_TOP_DIR/' .config
ct-ng build
- name: "upload log"
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.sample }}.${{ matrix.host }}.log"
path: |
build.log
.config
if: ${{ always() }}