diff options
author | Jameson Nash <vtjnash@gmail.com> | 2022-04-26 16:12:27 -0400 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2022-05-22 11:15:26 -0700 |
commit | f190148d226cd9eb489c9d73ebadec86fad8618b (patch) | |
tree | 137fb043699994c5d4a781d37d4b79ec43a44aa5 /.github | |
parent | 0c4484911dcaa47af09da3a717a66ab98dc7f7a8 (diff) | |
download | libunwind-f190148d226cd9eb489c9d73ebadec86fad8618b.tar.gz |
move linux CI to Github Actions
libunwind is out of free TravisCI credits now.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/CI-linux.yml | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/.github/workflows/CI-linux.yml b/.github/workflows/CI-linux.yml new file mode 100644 index 00000000..870d17ff --- /dev/null +++ b/.github/workflows/CI-linux.yml @@ -0,0 +1,124 @@ +name: CI-linux + +on: + pull_request: + paths: + - '**' + - '!README' + - '!INSTALL' + - '!NEWS' + - '!doc/**' + - '!.**' + - '.github/workflows/CI-linux.yml' + push: + branches: + - v[0-9].* + - master + +jobs: + build: + runs-on: ubuntu-latest + name: build-${{ join(matrix.*, ' ') }} + strategy: + fail-fast: false + matrix: + HOST: + - x86_64-linux-gnu + - x86-linux-gnu + - arm-linux-gnueabihf + - aarch64-linux-gnu + - mipsel-linux-gnu + - powerpc64-linux-gnu + OPT: + - O0 + - O3 + steps: + - uses: actions/checkout@v2 + - name: Setup + run: | + HOST=${{ matrix.HOST }} + if [ $HOST = 'x86-linux-gnu' ]; then + sudo apt-get update + sudo apt-get install -yqq -o=Dpkg::Use-Pty=0 g++-multilib + elif [ $HOST != 'x86_64-linux-gnu' ]; then + sudo apt-get update + sudo apt-get install -yqq -o=Dpkg::Use-Pty=0 g++-$HOST + fi + - name: Configure + run: | + set -x + HOST=${{ matrix.HOST }} + BUILD=x86_64-linux-gnu + if [ $HOST = 'x86-linux-gnu' ]; then + CFLAGS="-m32" + CXXFLAGS="-m32" + BUILD=x86-linux-gnu + fi + export CFLAGS="$CFLAGS -${{ matrix.OPT }}" + export CXXFLAGS="$CXXFLAGS -${{ matrix.OPT}}" + autoreconf -i + ./configure --build=$BUILD --host=$HOST + make -j8 + - name: Show Logs + if: ${{ failure() }} + run: | + cat tests/test-suite.log 2>/dev/null + - name: Test (native) + if: ${{ success() && (matrix.HOST == 'x86_64-linux-gnu' || matrix.HOST == 'x86-linux-gnu') }} + run: | + set -x + sudo bash -c 'echo core.%p.%p > /proc/sys/kernel/core_pattern' + ulimit -c unlimited + make check -j32 + + build-cross-qemu: + runs-on: ubuntu-latest + name: build-cross-qemu-${{ matrix.config.target }} + + strategy: + fail-fast: false + matrix: + config: + - {target: arm, toolchain: gcc-arm-linux-gnueabi, host: arm-linux-gnueabi, qemu: qemu-arm-static } + - {target: armhf, toolchain: gcc-arm-linux-gnueabihf, host: arm-linux-gnueabihf, qemu: qemu-arm-static } + - {target: aarch64, toolchain: gcc-aarch64-linux-gnu, host: aarch64-linux-gnu, qemu: qemu-aarch64-static } + - {target: riscv64, toolchain: gcc-riscv64-linux-gnu, host: riscv64-linux-gnu, qemu: qemu-riscv64-static } + - {target: ppc, toolchain: gcc-powerpc-linux-gnu, host: powerpc-linux-gnu, qemu: qemu-ppc-static } + - {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, host: powerpc64-linux-gnu, qemu: qemu-ppc64-static } + - {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, host: powerpc64le-linux-gnu, qemu: qemu-ppc64le-static } + - {target: s390x, toolchain: gcc-s390x-linux-gnu, host: s390x-linux-gnu, qemu: qemu-s390x-static } + - {target: mips, toolchain: gcc-mips-linux-gnu, host: mips-linux-gnu, qemu: qemu-mips-static } + - {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, host: mips64-linux-gnuabi64, qemu: qemu-mips64-static } + - {target: mipsel, toolchain: gcc-mipsel-linux-gnu, host: mipsel-linux-gnu, qemu: qemu-mipsel-static } + - {target: mips64el,toolchain: gcc-mips64el-linux-gnuabi64, host: mips64el-linux-gnuabi64,qemu: qemu-mips64el-static } + + steps: + - uses: actions/checkout@v2 + - name: Install QEMU + # this ensure install latest qemu on ubuntu, apt get version is old + env: + QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu" + QEMU_VER: "qemu-user-static_4\\.2-.*_amd64.deb$" + run: | + DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1` + wget $QEMU_SRC/$DEB + sudo dpkg -i $DEB + - name: Install ${{ matrix.config.toolchain }} + run: | + sudo apt update + sudo apt install ${{ matrix.config.toolchain }} -y + - name: Configure with ${{ matrix.config.cc }} + run: | + set -x + autoreconf -i + BUILD=x86_64-linux-gnu + ./configure --build=$BUILD --host=${{ matrix.config.host }} + - name: Build + run: | + make -j8 + - name: Test + run: | + set -x + sudo bash -c 'echo core.%p.%p > /proc/sys/kernel/core_pattern' + ulimit -c unlimited + ${{ matrix.config.qemu }} make -j8 check |