diff options
-rw-r--r-- | .github/workflows/check.yml | 23 | ||||
-rwxr-xr-x | docker/build.sh | 4 |
2 files changed, 26 insertions, 1 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..da1fe20 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,23 @@ +# Copyright (c) 2020 Johannes Stoelp + +on: [push, pull_request] + +jobs: + check_examples: + runs-on: ubuntu-latest + name: Check examples (all ARCHs) + steps: + - name: Checkout project + uses: actions/checkout@v2 + - name: Build docker image + run: | + docker/build.sh matcha-box + - name: Run examples + run: | + for arch in x86_64 arm64; do + echo -e "\e[1;32m==> check ARCH=$arch\e0m" + docker run \ + --rm \ + -v $PWD:/develop \ + matcha-box /bin/bash -c "make clean && make ARCH=$arch demo1" + done diff --git a/docker/build.sh b/docker/build.sh index 3b374e6..e40b83d 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -3,7 +3,9 @@ image=${1:-match-box} -if ! docker build -t $image . ; then +script_dir=$(readlink -f $(dirname $0)) + +if ! docker build -t $image $script_dir ; then echo "ERR: Failed to build docker image!" exit 1 fi |