Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update environment.yml and CI #24

Merged
merged 14 commits into from
Dec 20, 2023
73 changes: 50 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ v2.x ]
branches: [ master, v2.x ]
pull_request:
branches: [ v2.x ]
branches: [ master, v2.x ]
schedule:
# Run every Sunday at midnight
- cron: '0 0 * * 0'
Expand All @@ -26,44 +26,71 @@ jobs:
- name: Linux (CUDA 10.2)
cuda: "10.2.89"
gcc: "8.5.*"
nvcc: "10.2"
cuda12: false

# Latest supported versions
- name: Linux (CUDA 11.8)
cuda: "11.8.0"
gcc: "10.3.*"
nvcc: "11.8"

- name: Linux (CUDA 12.1)
cuda: "12.1.*"
gcc: "11.*"
cuda12: true
steps:
- name: Check out
uses: actions/checkout@v2

- name: Install Mamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: false
extra-specs: ""
cache-env: true
cache-downloads: true
- name: Manage disk space
run: |
sudo mkdir -p /opt/empty_dir || true
for d in \
/opt/ghc \
/opt/hostedtoolcache \
/usr/lib/jvm \
/usr/local/.ghcup \
/usr/local/lib/android \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift \
; do
sudo rsync --stats -a --delete /opt/empty_dir/ $d || true
done
sudo apt-get purge -y -f firefox \
google-chrome-stable \
microsoft-edge-stable
sudo apt-get autoremove -y >& /dev/null
sudo apt-get autoclean -y >& /dev/null
sudo docker image prune --all --force
df -h

- name: Install CUDA Toolkit
# CUDA 12 can be installed with mamba
if: ${{ matrix.cuda12 == 'false' }}
uses: Jimver/[email protected]
with:
cuda: ${{ matrix.cuda }}
linux-local-args: '["--toolkit", "--override"]'
linux-local-args: '["--toolkit", "--override"]'

- name: Prepare dependencies
- name: Prepare dependencies (CUDA <12)
if: ${{ matrix.cuda12 == 'false'}}
run: |
sed -i -e "/cudatoolkit/c\ - cudatoolkit ${{ matrix.cuda }}" \
sed -i -e "/cuda-version/d" \
-e "/cuda-libraries-dev/d" \
-e "/cuda-nvcc/d" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/nvcc_linux-64/c\ - nvcc_linux-64 ${{ matrix.nvcc }}" \
environment.yml

- name: Prepare dependencies (CUDA >=12)
if: ${{ matrix.cuda12 == 'true' }}
run: |
sed -i -e "/cuda-version/c\ - cuda-version ${{ matrix.cuda }}" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
environment.yml
- name: Show dependency file
run: cat environment.yml

- name: Install dependencies
run: micromamba env create -n uammd -f environment.yml

- name: Install Mamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
cache-environment: false
cache-downloads: true
env:
CONDA_OVERRIDE_CUDA: ${{ matrix.nvcc }}

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build Documentation

on:
push:
branches: [ master, v2.x ]
pull_request:
branches: [ master, v2.x ]

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install docs dependencies
run: |
pip install -r docs/requirements.txt
shell: bash -el {0}

- name: Build Sphinx Documentation
run: |
cd docs
make html
shell: bash -el {0}
11 changes: 6 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: uammd
channels:
- conda-forge
dependencies:
- cmake >=3.22
- cudatoolkit 11.8.*
- gxx_linux-64 10.3.*
- cuda-version 12.*
- gxx_linux-64 11.*
- cuda-libraries-dev
- cuda-nvcc
- make
- nvcc_linux-64 11.8
- sysroot_linux-64 2.17
- mkl-devel
- pybind11
- python 3.10.*
- python 3.11.*
Loading