From 38034eafd57093503c291a9594c65258f3d27c9d Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Tue, 26 Sep 2023 11:16:02 +0300 Subject: [PATCH] Add CI based on Github Actions Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 52 +++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..a3e3cbc --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build on Linux x86_64 + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y file + + - name: Build + run: | + make -j all + file wtdbg2 | grep x86-64 + + build-aarch64: + name: Build on Linux aarch64 + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + githubToken: ${{ github.token }} + dockerRunArgs: | + --volume "${PWD}:/wtdbg2" + install: | + apt-get update -q -y + apt-get install -q -y make gcc file zlib1g-dev + run: | + cd /wtdbg2 + make -j all + file wtdbg2 | grep aarch64 diff --git a/Makefile b/Makefile index 92129ca..2680868 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif ARCH := $(shell uname -m) ifeq ($(ARCH), x86_64) ARCH_CFLAGS=-mpopcnt -msse4.2 -else ($(ARCH), aarch64) +else ifeq ($(ARCH), aarch64) ARCH_CFLAGS= endif