Skip to content

Commit

Permalink
combined build and generate into single step
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Jul 12, 2023
1 parent 1a9e119 commit 8cb732d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 47 deletions.
60 changes: 14 additions & 46 deletions .github/workflows/package-pydra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:

build:
generate-pydra:

runs-on: ubuntu-latest

Expand All @@ -29,60 +29,28 @@ jobs:
CXX_COMPILER_LAUNCHER: sccache

steps:
- uses: actions/checkout@v1

- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3

- name: configure
run: ./configure -assert || { cat configure.log; false; }

- name: build
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
- name: Upload bin directory
uses: actions/upload-artifact@v2
with:
name: Bin
path: bin
- name: Upload shared lib
uses: actions/upload-artifact@v2
with:
name: Shared
path: lib/libmrtrix.so

- uses: actions/checkout@v1

generate-pydra:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download bin directory
uses: actions/download-artifact@v2
with:
name: Bin
path: bin
- name: Set execute perms on bin
run: chmod +x ./bin/*
- name: Download shared lib
uses: actions/download-artifact@v2
with:
name: Shared
path: lib/libmrtrix.so
- name: Install MRtrix dependencies
run: |
sudo apt-get update
sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Configure MRtrix
run: ./configure -assert || { cat configure.log; false; }
- name: Build MRtrix
run: ./build -nowarnings -persistent -nopaginate || { cat build.log; false; }
- name: Set PATH Variable
run: echo "PATH=$PATH:$(pwd)/bin" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH Variable
run: echo "LD_LIBRARY_PATH=$(pwd)/lib" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v2
- name: Install build dependencies
- name: Install Python build dependencies
run: |
python -m pip install --upgrade pip
- name: Install requirements
- name: Install pydra-auto-gen requirements
run: |
pip install -r pydra/requirements.txt
- name: Generate task specifications
Expand Down
2 changes: 1 addition & 1 deletion pydra/pydra-auto-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ def auto_gen_mrtrix3_pydra(cmd_dir: Path, output_dir: Path, log_errors: bool):
[
str(script_dir.parent / "bin"),
str(script_dir / "src" / "pydra" / "tasks" / "mrtrix3" / "latest"),
"--log-errors",
"--raise-errors",
]
)

0 comments on commit 8cb732d

Please sign in to comment.