-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add GitHub Actions build, modernizing docker image & WDL
- Loading branch information
Showing
9 changed files
with
439 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: build | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: deps | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y clang-format cppcheck python3-pip | ||
sudo pip3 install --system pre-commit | ||
- name: pre-commit | ||
run: pre-commit run --all-files | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: build | ||
run: | | ||
docker pull ubuntu:18.04 | ||
docker pull ubuntu:20.04 | ||
docker build --no-cache -t spvcf . | ||
- name: inspect | ||
run: | | ||
docker run -v $(pwd):/mnt spvcf cp /usr/local/bin/spvcf /mnt | ||
ldd spvcf | ||
sha256sum spvcf | ||
- name: upload exe | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: spvcf | ||
path: spvcf | ||
- name: WDL test | ||
run: | | ||
pip3 install --upgrade miniwdl | ||
miniwdl run test/test_spvcf.wdl vcf_gz=test/data/small.vcf.gz docker=spvcf:latest --verbose | ||
- name: docker login ghcr.io | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: push image | ||
run: | | ||
REPO="ghcr.io/mlin/spvcf" | ||
TAG="$(git describe --tags --always --dirty)" | ||
docker tag spvcf:latest "${REPO}:${TAG}" | ||
docker push "${REPO}:${TAG}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: clang-format | ||
name: clang-format | ||
language: system | ||
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$ | ||
exclude: (json1|uint)\.c | ||
verbose: true | ||
entry: clang-format | ||
args: [-i,'-style={IndentWidth: 4, ColumnLimit: 100, BreakStringLiterals: false, ReflowComments: false}'] | ||
- id: cppcheck | ||
name: cppcheck | ||
language: system | ||
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$ | ||
exclude: json1\.c | ||
verbose: true | ||
entry: cppcheck | ||
args: [-q,--language=c++,--std=c++14] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.