From 9f552603a76c64bdaaa2ad650aefa66691e0ea51 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 23 May 2022 12:10:41 +0200 Subject: [PATCH] Github actions --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) 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..d8324fb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: build + +on: [push, pull_request] + +jobs: + docker-linux-static: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: satackey/action-docker-layer-caching@v0.0.11 + if: "!startsWith(github.ref, 'refs/tags/v')" + continue-on-error: true + with: + key: docker-linux-static-{hash} + restore-keys: | + docker-linux-static- + - name: install dependencies + run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 + - name: prepare build environment + run: docker build -t feather:linux -f Dockerfile.linux --build-arg THREADS=3 . + - name: build + run: docker run --rm -it -v /home/runner/work/feather/feather:/feather -w /feather feather:linux sh -c 'WITH_SCANNER=Off make release-static -j3' + - name: sha256sum + run: shasum -a256 /home/runner/work/feather/feather/build/release/bin/feather + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.job }} + path: | + /home/runner/work/feather/feather/build/release/bin/feather