crosstool-ng/.github/workflows/continuous-integration-workflow.yml
Chris Packham b0ca9b8ca7 CI: Replace add-path command
The add-path and set-env commands are being deprecated[1]. Replace the
one instance of add-path in the CI workflow with the recommended
alternative[2].

[1] - https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
[2] - https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2020-11-10 21:10:31 +13:00

87 lines
2.3 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
crosstool:
runs-on: ubuntu-latest
steps:
- name: "clone"
uses: actions/checkout@v2
- name: "prereq"
run: |
sudo apt-get install -y gperf help2man libtool-bin
- name: "build ct-ng"
run: |
./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
path: ct-ng.tar
- name: "upload config.log"
uses: actions/upload-artifact@v2
with:
name: config.log
path: config.log
if: ${{ always() }}
toolchains:
needs: crosstool
runs-on: ubuntu-latest
strategy:
matrix:
sample: [
"aarch64-unknown-linux-gnu",
"arc-multilib-linux-uclibc",
"arm-picolibc-eabi",
"arm-unknown-linux-gnueabi",
"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-multilib-linux-gnu",
"sparc-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
"x86_64-multilib-linux-uclibc",
"xtensa-fsf-linux-uclibc"
]
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 "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: "build ${{ matrix.sample }}"
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 }}.log"
path: |
build.log
.config
if: ${{ always() }}