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-08-20 08:28:07 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: "clone"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "prereq"
|
|
|
|
run: |
|
2020-08-22 23:45:41 +00:00
|
|
|
sudo apt-get install -y gperf help2man libtool-bin
|
2020-08-20 08:28:07 +00:00
|
|
|
- name: "build ct-ng"
|
|
|
|
run: |
|
|
|
|
./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:
|
|
|
|
name: crosstool
|
|
|
|
path: ct-ng.tar
|
2020-08-22 23:56:20 +00:00
|
|
|
- name: "upload config.log"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: config.log
|
|
|
|
path: config.log
|
|
|
|
if: ${{ always() }}
|
2020-08-24 08:38:36 +00:00
|
|
|
|
|
|
|
toolchains:
|
|
|
|
needs: crosstool
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
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-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
|
|
|
]
|
|
|
|
steps:
|
|
|
|
- name: "download ct-ng"
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: crosstool
|
|
|
|
- name: "extract ct-ng"
|
|
|
|
run: |
|
|
|
|
tar -xf ct-ng.tar
|
|
|
|
- name: "prereq"
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y gperf help2man libtool-bin
|
|
|
|
echo "::add-path::$GITHUB_WORKSPACE/.local/bin"
|
2020-08-20 08:28:07 +00:00
|
|
|
- name: "build ${{ matrix.sample }}"
|
|
|
|
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:
|
|
|
|
name: "${{ matrix.sample }}.log"
|
|
|
|
path: |
|
|
|
|
build.log
|
|
|
|
.config
|
|
|
|
if: ${{ always() }}
|