Skip to content

Commit

Permalink
Merge pull request graphnet-team#612 from RasmusOrsoe/workflow_fix
Browse files Browse the repository at this point in the history
Workflow Fix
  • Loading branch information
RasmusOrsoe authored Oct 9, 2023
2 parents f64e847 + 057f1be commit aa2a9b1
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 13 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ jobs:
name: Unit tests - IceTray
needs: [ check-codeclimate-credentials ]
runs-on: ubuntu-latest
container: icecube/icetray:icetray-prod-v1.8.1-ubuntu20.04-X64
container:
image: icecube/icetray:icetray-prod-v1.8.1-ubuntu20.04-X64
options: --user root
steps:
- name: install git
run: |
apt-get --yes install sudo
sudo apt update --fix-missing --yes
sudo apt upgrade --yes
sudo apt-get install --yes git-all
- name: Set environment variables
run: |
echo "PATH=/usr/local/icetray/bin:$PATH" >> $GITHUB_ENV
Expand All @@ -61,9 +69,9 @@ jobs:
coverage run --source=graphnet -m pytest tests/examples/01_icetray
coverage xml -o coverage.xml
#- name: Work around permission issue
# run: |
# git config --global --add safe.directory /__w/graphnet/graphnet
- name: Work around permission issue
run: |
git config --global --add safe.directory /__w/graphnet/graphnet
- name: Publish code coverage
uses: paambaati/[email protected]
if: needs.check-codeclimate-credentials.outputs.has_credentials == 'true'
Expand Down Expand Up @@ -93,14 +101,21 @@ jobs:
editable: true
- name: Print available disk space after graphnet install
run: df -h
- name: Print packages in pip
run: |
pip show torch
pip show torch-geometric
pip show torch-cluster
pip show torch-sparse
pip show torch-scatter
- name: Run unit tests and generate coverage report
run: |
set -o pipefail # To propagate exit code from pytest
coverage run --source=graphnet -m pytest tests/ --ignore=tests/utilities --ignore=tests/data/ --ignore=tests/deployment/ --ignore=tests/examples/01_icetray/
coverage run --source=graphnet -m pytest tests/utilities
coverage report -m
- name: Print available disk space after unit tests
run: df -h
run: df -h

build-macos:
name: Unit tests - macOS
Expand All @@ -116,8 +131,15 @@ jobs:
with:
editable: true
hardware: "macos"
- name: Print packages in pip
run: |
pip show torch
pip show torch-geometric
pip show torch-cluster
pip show torch-sparse
pip show torch-scatter
- name: Run unit tests and generate coverage report
run: |
set -o pipefail # To propagate exit code from pytest
coverage run --source=graphnet -m pytest tests/ --ignore=tests/data/ --ignore=tests/deployment/ --ignore=tests/examples/
coverage report -m
coverage report -m
22 changes: 22 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ jobs:
packages: write
contents: read
steps:
- name: Before Clean-up
run: |
echo "Free space:"
df -h
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true

# all of these default to true, but feel free to set to
# false if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: After Clean-up
run: |
echo "Free space:"
df -h
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ $ conda create --name graphnet python=3.8 gcc_linux-64 gxx_linux-64 libgcc cudat
$ conda activate graphnet # Optional
(graphnet) $ pip install -r requirements/torch_cpu.txt -e .[develop,torch] # CPU-only torch
(graphnet) $ pip install -r requirements/torch_gpu.txt -e .[develop,torch] # GPU support
(graphnet) $ pip install -r requirements/torch_macos.txt -e .[develop,torch] # On macOS
```
This should allow you to e.g. run the scripts in [examples/](./examples/) out of the box.

Expand Down
2 changes: 1 addition & 1 deletion requirements/torch_cpu.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--find-links https://download.pytorch.org/whl/cpu
--find-links https://data.pyg.org/whl/torch-2.0.0+cpu.html
--find-links https://data.pyg.org/whl/torch-2.1.0+cpu.html
4 changes: 2 additions & 2 deletions requirements/torch_gpu.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contains packages recommended for functional performance
--find-links https://download.pytorch.org/whl/torch_stable.html
torch==2.0.1+cu117
--find-links https://data.pyg.org/whl/torch-2.0.0+cu117.html
torch==2.1.1+cu117
--find-links https://data.pyg.org/whl/torch-2.1.0+cu117.html
2 changes: 1 addition & 1 deletion requirements/torch_macos.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--find-links https://download.pytorch.org/whl/torch_stable.html
--find-links https://data.pyg.org/whl/torch-2.0.0+cpu.html
--find-links https://data.pyg.org/whl/torch-2.1.0+cpu.html
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"versioneer",
],
"torch": [
"torch>=2.0",
"torch>=2.1",
"torch-cluster>=1.6",
"torch-scatter>=2.0",
"torch-sparse>=0.6",
"torch-geometric>=2.1",
"torch-geometric>=2.3",
"pytorch-lightning>=2.0",
],
}
Expand Down

0 comments on commit aa2a9b1

Please sign in to comment.