-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README and tests for binary distribution
- Loading branch information
Showing
5 changed files
with
109 additions
and
23 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,29 @@ | ||
name: binary tarball | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
branches: [ master ] | ||
repository_dispatch: | ||
types: [linux-binary-test, install-test] | ||
schedule: | ||
- cron: '15 15 * * *' # 3:15pm every day | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ncbi-blast+ | ||
echo "TERM=-$TERM-" | ||
- name: download | ||
run: bash -x .github/workflows/get_binary_release.sh | tee | tail -1 > dirname | ||
- name: | ||
run: stxtyper_v*/stxtyper -v | ||
- name: run tests included with distribution | ||
run: | | ||
directory=$(cat dirname) | ||
cd $directory | ||
./test_stxtyper.sh |
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,28 @@ | ||
#!/bin/bash | ||
# found and lightly modified these functions | ||
get_latest_release() { | ||
curl --silent "https://api.github.com/repos/$1/releases/latest" | | ||
grep '"tag_name":' | | ||
cut -d '"' -f 4 | ||
} | ||
|
||
get_tarball_url() { | ||
curl --silent "https://api.github.com/repos/$1/releases/latest" | | ||
fgrep '"browser_download_url":' | | ||
cut -d '"' -f 4 | ||
} | ||
|
||
|
||
release=$(get_latest_release ncbi/stxtyper) | ||
URL=$(get_tarball_url ncbi/stxtyper) | ||
|
||
>&2 echo "Downloading StxTyper version $release" | ||
>&2 echo "Binaries from $URL" | ||
|
||
# download and unpack AMRFinder binaries | ||
curl --silent -L -O $URL | ||
tarball_name=$(echo $URL | perl -pe 's#^.*/(.*)#\1#') | ||
tar xfz $tarball_name | ||
rm $tarball_name | ||
directory=$(echo $tarball_name | sed 's/.tar.gz//') | ||
echo $directory |
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
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