-
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.
Merge pull request #5 from phac-nml/dev
Rustify
- Loading branch information
Showing
83 changed files
with
10,979 additions
and
5,890 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,24 @@ | ||
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below. | ||
|
||
# NOTE: For maximum performance, build using a nightly compiler | ||
# If you are using rust stable, remove the "-Zshare-generics=y" below. | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
linker = "clang" | ||
rustflags = ["-Clink-arg=-fuse-ld=lld"] | ||
|
||
# NOTE: you must install [Mach-O LLD Port](https://lld.llvm.org/MachO/index.html) on mac. you can easily do this by installing llvm which ilslsncludes lld with the "brew" package manager: | ||
# `brew install llvm` | ||
[target.x86_64-apple-darwin] | ||
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld"] | ||
|
||
[target.aarch64-apple-darwin] | ||
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld"] | ||
|
||
[target.x86_64-pc-windows-msvc] | ||
linker = "rust-lld.exe" | ||
|
||
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' | ||
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. | ||
#[profile.dev] | ||
#debug = 1 |
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,58 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
release: | ||
types: [published] | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
# --------------------------------------------------------------------------- | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
#- aarch64-apple-darwin | ||
#- aarch64-unknown-linux-gnu | ||
#- aarch64-unknown-linux-musl | ||
#- x86_64-apple-darwin | ||
#- x86_64-pc-windows-gnu | ||
- x86_64-unknown-linux-gnu | ||
#- x86_64-unknown-linux-musl | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.74.0 | ||
|
||
- name: build | ||
run: | | ||
cargo build --release --all-features --target ${{ matrix.arch }} | ||
- name: compress with upx | ||
uses: crazy-max/ghaction-upx@v3 | ||
with: | ||
version: v4.1.0 | ||
files: | | ||
target/${{ matrix.arch }}/release/rebar | ||
args: --best --lzma | ||
|
||
- name: upload binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rebar-${{ matrix.arch }} | ||
path: target/${{ matrix.arch }}/release/rebar |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,77 @@ | ||
name: Latest | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
release: | ||
types: [published] | ||
|
||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
tag: "latest" | ||
|
||
jobs: | ||
|
||
build: | ||
uses: ./.github/workflows/build.yaml | ||
|
||
# --------------------------------------------------------------------------- | ||
latest: | ||
|
||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
#- aarch64-apple-darwin | ||
#- aarch64-unknown-linux-gnu | ||
#- aarch64-unknown-linux-musl | ||
#- x86_64-apple-darwin | ||
#- x86_64-pc-windows-gnu | ||
- x86_64-unknown-linux-gnu | ||
#- x86_64-unknown-linux-musl | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: download binary from build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: rebar-${{ matrix.arch }} | ||
path: target/${{ matrix.arch }}/release | ||
|
||
- name: install | ||
run: | | ||
mkdir -p /home/runner/.local/bin | ||
mv target/${{ matrix.arch }}/release/rebar ~/.local/bin | ||
chmod +x ~/.local/bin/rebar | ||
rebar --help | ||
- name: dataset download | ||
run: | | ||
rebar dataset download --name sars-cov-2 --tag $tag --output-dir dataset/sars-cov-2/$tag | ||
- name: validate | ||
run: | | ||
rebar run --dataset-dir dataset/sars-cov-2/$tag --output-dir validate --populations "*" --threads 2 | ||
if [[ $(grep "fail" validate/linelist.tsv) ]]; then exit 1; fi | ||
- name: plot | ||
run: | | ||
rebar plot --dataset-dir dataset/sars-cov-2/$tag --output-dir validate --plot-dir validate/plots | ||
- name: upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: validate-${{ matrix.arch }} | ||
path: validate |
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.