Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chtsai0105 committed Sep 22, 2023
1 parent 4c39ff6 commit 908ad47
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 7 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,52 @@ on:
workflow_dispatch:

jobs:
build_ASTER:
runs-on: ubuntu-latest

steps:
- name: Cache ASTER binary
uses: actions/cache@v3
with:
path: ~/.local/bin/astral
key: ASTER-Linux

- name: Install dependencies
run: |
if ! [ -f ~/.local/bin/astral ]; \
then sudo apt-get install build-essential cmake g++ wget unzip; \
fi
- name: Build ASTER
run: |
if ! [ -f ~/.local/bin/astral ]; \
then \
wget https://github.com/chaoszhang/ASTER/archive/refs/heads/Linux.zip; \
unzip Linux.zip; \
cd ASTER-Linux; \
make; \
fi
- name: Move Binary
run: |
if ! [ -f ~/.local/bin/astral ]; \
then \
mkdir -p ~/.local/bin; \
cp ASTER-Linux/bin/astral ~/.local/bin/; \
chmod +x ~/.local/bin/astral; \
fi
working-directory: ${{ github.workspace }}

- name: Export ASTER to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which astral
build-conda:
runs-on: ubuntu-latest

needs: build_ASTER

steps:
- uses: actions/checkout@v3

Expand All @@ -36,6 +79,12 @@ jobs:
pip install .
shell: micromamba-shell {0}

- name: Cache ASTER binary
uses: actions/cache@v3
with:
path: ~/.local/bin/astral
key: ASTER-Linux

- name: Test with pytest
run: |
pytest
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Cache ASTER binary
- name: Cache VeryFastTree binary
uses: actions/cache@v3
with:
path: ~/.local/bin/astral
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
build:
runs-on: ubuntu-latest

needs: build_ASTER
needs: [build_ASTER, build_VeryFastTree]

strategy:
fail-fast: false
Expand Down Expand Up @@ -140,11 +140,11 @@ jobs:
path: ~/.local/bin/astral
key: ASTER-Linux

- name: Export binary to PATH and verify
run: |
export PATH=$PATH:$HOME/.local/bin
which astral
which VeryFastTree
- name: Cache VeryFastTree binary
uses: actions/cache@v3
with:
path: ~/.local/bin/VeryFastTree
key: VeryFastTree-Linux

- name: Test with pytest
run: |
Expand Down

0 comments on commit 908ad47

Please sign in to comment.