Commit 41d2dd0f authored by c.fortmanngrote's avatar c.fortmanngrote
Browse files

Update ci and cli

Simplify packaging by copying needed jar, and py libs and zip them up. This avoids having to compile on
each separate target platform.
parent a04af5ac
Pipeline #295249 passed with stages
in 2 minutes and 39 seconds
......@@ -19,12 +19,9 @@ build:
- CI/build.sh
- source ~/.bashrc
- conda activate repinpop
- touch __init__.py
- ./pkg-build.sh
artifacts:
paths:
- REPIN_ecology/REPIN_ecology/build/libs/REPIN_ecology.jar
- pkg-dist/rarefan
- build
test:unittest:
......@@ -113,13 +110,22 @@ deploy:
stage: deploy
dependencies:
- build
rules:
- if: $CI_COMMIT_TAG
script:
- zip rarefan.zip -r pkg-dist/rarefan
- tar czf rarefan.tar.gz pkg-dist/rarefan
- mkdir pkg-dist
- cp REPIN_ecology/REPIN_ecology/build/libs/REPIN_ecology.jar pkg-dist
- cp app/utilities/checkers.py pkg-dist
- cp app/utilities/rarefan_cli.py pkg-dist/rarefan
- chmod 755 pkg-dist/rarefan
- cd pkg-dist
- zip ../rarefan-${CI_COMMIT_TAG}.zip *.jar *.py rarefan
- tar czvf ../rarefan-${CI_COMMIT_TAG}.tar.gz *.jar *.py rarefan
artifacts:
paths:
- rarefan.zip
- rarefan.tar.gz
- rarefan-${CI_COMMIT_TAG}.zip
- rarefan-${CI_COMMIT_TAG}.tar.gz
release_job:
stage: release
......
#!/usr/bin/env python
#!/usr/bin/env python3
import argparse
import os, sys
......@@ -6,10 +6,7 @@ import subprocess
from io import StringIO
import shlex
# Test if we are bundled.
is_bundled = getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS')
if is_bundled:
if "REPIN_ecology.jar" in os.listdir():
JAR = 'REPIN_ecology.jar'
else:
JAR = os.path.join(os.environ["CONDA_PREFIX"], "lib", 'REPIN_ecology.jar')
......@@ -248,7 +245,6 @@ if __name__ == '__main__':
results = parse_results(args.outdir, os.path.basename(args.reference))
counts = results['counts']
print("")
print("Results")
print("-------")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment