2020-08-20 08:28:07 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2020-08-24 08:38:36 +00:00
|
|
|
crosstool:
|
2020-11-10 17:03:36 +00:00
|
|
|
runs-on: ${{ matrix.host }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
host: [
|
|
|
|
"ubuntu-latest",
|
|
|
|
"macos-10.15",
|
|
|
|
]
|
2020-08-20 08:28:07 +00:00
|
|
|
steps:
|
|
|
|
- name: "clone"
|
|
|
|
uses: actions/checkout@v2
|
2020-11-10 17:03:36 +00:00
|
|
|
- name: "prereq Linux"
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2020-08-20 08:28:07 +00:00
|
|
|
run: |
|
2020-08-22 23:45:41 +00:00
|
|
|
sudo apt-get install -y gperf help2man libtool-bin
|
2020-11-10 17:03:36 +00:00
|
|
|
- name: "prereq macOS"
|
|
|
|
if: ${{ runner.os == 'macOS' }}
|
|
|
|
run: |
|
|
|
|
brew install autoconf automake bash binutils gawk gnu-sed \
|
|
|
|
gnu-tar help2man ncurses
|
2020-08-20 08:28:07 +00:00
|
|
|
- name: "build ct-ng"
|
|
|
|
run: |
|
2020-11-10 17:03:36 +00:00
|
|
|
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
|
2020-08-20 08:28:07 +00:00
|
|
|
./bootstrap
|
2020-08-24 08:38:36 +00:00
|
|
|
./configure --prefix=$PWD/.local/
|
2020-08-20 08:28:07 +00:00
|
|
|
make
|
2020-08-24 08:38:36 +00:00
|
|
|
make install
|
|
|
|
tar -cf ct-ng.tar .local/
|
|
|
|
- name: "upload ct-ng"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-11-10 17:03:36 +00:00
|
|
|
name: crosstool.${{ matrix.host }}
|
2020-08-24 08:38:36 +00:00
|
|
|
path: ct-ng.tar
|
2020-08-22 23:56:20 +00:00
|
|
|
- name: "upload config.log"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-11-10 17:03:36 +00:00
|
|
|
name: config.log.${{ matrix.host }}
|
2020-08-22 23:56:20 +00:00
|
|
|
path: config.log
|
|
|
|
if: ${{ always() }}
|
2020-08-24 08:38:36 +00:00
|
|
|
|
|
|
|
toolchains:
|
|
|
|
needs: crosstool
|
2020-11-10 17:03:36 +00:00
|
|
|
runs-on: ${{ matrix.host }}
|
2020-08-24 08:38:36 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-11-10 17:03:36 +00:00
|
|
|
host: [
|
|
|
|
"ubuntu-latest",
|
|
|
|
"macos-10.15",
|
|
|
|
]
|
2020-08-24 08:38:36 +00:00
|
|
|
sample: [
|
|
|
|
"aarch64-unknown-linux-gnu",
|
2020-08-30 09:15:48 +00:00
|
|
|
"arc-multilib-linux-uclibc",
|
|
|
|
"arm-picolibc-eabi",
|
|
|
|
"arm-unknown-linux-gnueabi",
|
2020-11-01 08:11:29 +00:00
|
|
|
"armv6-nommu-linux-uclibcgnueabi",
|
2020-08-24 08:38:36 +00:00
|
|
|
"mips-unknown-elf",
|
2020-08-30 09:15:48 +00:00
|
|
|
"mips64-unknown-linux-gnu",
|
2020-08-24 08:38:36 +00:00
|
|
|
"powerpc-unknown-linux-gnu",
|
2020-08-30 09:15:48 +00:00
|
|
|
"powerpc64-unknown-linux-gnu",
|
|
|
|
"riscv32-unknown-elf",
|
|
|
|
"riscv64-unknown-elf",
|
|
|
|
"s390-unknown-linux-gnu",
|
|
|
|
"sh-multilib-linux-gnu",
|
|
|
|
"sparc-unknown-linux-gnu",
|
|
|
|
"x86_64-unknown-linux-gnu",
|
|
|
|
"x86_64-multilib-linux-uclibc",
|
|
|
|
"xtensa-fsf-linux-uclibc"
|
2020-08-24 08:38:36 +00:00
|
|
|
]
|
2020-11-10 17:03:36 +00:00
|
|
|
exclude:
|
|
|
|
# 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"
|
2020-08-24 08:38:36 +00:00
|
|
|
steps:
|
2020-11-10 17:03:36 +00:00
|
|
|
- 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
|
2020-08-24 08:38:36 +00:00
|
|
|
- name: "download ct-ng"
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 17:03:36 +00:00
|
|
|
name: crosstool.${{ matrix.host }}
|
2020-08-24 08:38:36 +00:00
|
|
|
- name: "extract ct-ng"
|
|
|
|
run: |
|
|
|
|
tar -xf ct-ng.tar
|
2020-11-10 17:03:36 +00:00
|
|
|
- name: "prereq Linux"
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2020-08-24 08:38:36 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get install -y gperf help2man libtool-bin
|
2020-11-10 07:58:47 +00:00
|
|
|
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
|
2020-11-10 17:03:36 +00:00
|
|
|
- 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 }}"
|
2020-08-20 08:28:07 +00:00
|
|
|
run: |
|
|
|
|
mkdir -p src
|
2020-08-24 08:38:36 +00:00
|
|
|
ct-ng ${{ matrix.sample }}
|
2020-08-20 08:28:07 +00:00
|
|
|
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
|
2020-08-24 08:38:36 +00:00
|
|
|
ct-ng build
|
2020-08-22 23:56:20 +00:00
|
|
|
- name: "upload log"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-11-10 17:03:36 +00:00
|
|
|
name: "${{ matrix.sample }}.${{ matrix.host }}.log"
|
2020-08-22 23:56:20 +00:00
|
|
|
path: |
|
|
|
|
build.log
|
|
|
|
.config
|
|
|
|
if: ${{ always() }}
|