From 8e1d79ea4e38105dc9dd0a1a3f4c490ba003c799 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 26 Aug 2024 23:27:58 +0200 Subject: [PATCH] ci: Add workflow for building and testing on supported architectures --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ README.md | 2 -- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5f83e5a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build and test + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + name: ${{ matrix.arch }} + runs-on: ubuntu-latest + strategy: + matrix: + arch: [armv7, aarch64, x86_64] + fail-fast: false + env: + MAKEFLAGS: -j + steps: + - name: Install dependencies + run: | + sudo apt-get -y update + sudo apt-get -y install autoconf automake bison flex qemu-system-arm qemu-system-x86 + + - uses: actions/checkout@v4 + with: + clean: true + + - name: Restore cache of test/cache + uses: actions/cache@v4 + with: + path: test/cache + key: cache-${{ matrix.arch }}-${{ hashFiles('test/Makefile') }} + restore-keys: | + cache-${{ matrix.arch }}- + cache- + + - name: Build + run: | + make -C test ${{ matrix.arch }}-build + + - name: Check + run: | + make -C test ${{ matrix.arch }}-check diff --git a/README.md b/README.md index d39915c..76b4766 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -![CI](https://github.com/wkz/ply/workflows/CI/badge.svg) - ply ===