Skip to content

Commit

Permalink
Merge pull request digibyte#39 from SmartArray/tests/ci_workflow
Browse files Browse the repository at this point in the history
Continuous Integration: GitHub Workflow
  • Loading branch information
gto90 authored Apr 21, 2021
2 parents 3e91eef + 2d34e96 commit a0b60fa
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Build and check'

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [x86_64-linux-gnu]

steps:
- uses: actions/checkout@v2

- name: Cache apt depencenies
uses: actions/cache@v2
id: cache-apt
with:
path: "~/apt-cache"
key: apt-cache

- name: Cache depends
id: cache-dependencies
uses: actions/cache@v2
with:
path: depends/${{ matrix.os }}
key: ${{ matrix.os }}-${{ hashFiles('depends/packages/*.mk') }}

- name: Install apt dependencies
env:
CACHE_HIT: ${{steps.cache-apt.outputs.cache-hit}}
DEPS: build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache
run: |
if [[ "$CACHE_HIT" == 'true' ]]; then
sudo cp --force --recursive ~/apt-cache/* /
else
sudo apt-get update && sudo apt-get install -yq $DEPS
mkdir -p ~/apt-cache
for dep in $DEPS; do
dpkg -L $dep | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/apt-cache/
done
fi
- name: Build depends
if: steps.cache-dependencies.outputs.cache-hit != 'true' && steps.cache-apt.outputs.cache-hit != 'true'
run: cd depends/ && make -j4 HOST=${{matrix.os}}

- name: Auto generate
run: ./autogen.sh

- name: configure
run: ./configure --with-incompatible-bdb --prefix=`pwd`/depends/${{ matrix.os }}

- name: make
run: make -j4

- name: check
run: make check

0 comments on commit a0b60fa

Please sign in to comment.