From 5e5bb934f178cc8fc10cafa11d81a167ed946277 Mon Sep 17 00:00:00 2001 From: amstokely Date: Mon, 27 Nov 2023 09:44:43 -0700 Subject: [PATCH] feat: enabled self-hosted CI. --- .github/workflows/netsci_CI.yml | 34 ++++++++++++++++----------------- netsci.yml | 11 +++++++++++ 2 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 netsci.yml diff --git a/.github/workflows/netsci_CI.yml b/.github/workflows/netsci_CI.yml index 6c5e45c..58a6899 100644 --- a/.github/workflows/netsci_CI.yml +++ b/.github/workflows/netsci_CI.yml @@ -1,34 +1,34 @@ name: netcalc -on: [push, workflow_dispatch] +on: [ push, workflow_dispatch ] jobs: run: - runs-on: [self-hosted] + runs-on: [ self-hosted ] env: repo_token: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 - - name: Setup anaconda - uses: conda-incubator/setup-miniconda@v2 + - uses: mamba-org/setup-micromamba@v1 with: - miniconda-version: "latest" - channels: bioconda, conda-forge, defaults - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - auto-update-conda: true - auto-activate-base: true + micromamba-version: '1.3.1-0' + environment-file: netsci.yml + init-shell: >- + bash + powershell + cache-environment: true + post-cleanup: 'all' - name: Install netcalc dependencies run: | - conda install -c conda-forge swig boost numpy cmake pytest + conda install -c conda-forge swig boost numpy cmake pytest - name: build run: | - mkdir build - cd build - cmake .. -DCONDA_DIR=$CONDA_PREFIX -DCUDA_ARCHITECTURE=52 - cmake --build . -j - make python + mkdir build + cd build + cmake .. -DCONDA_DIR=$CONDA_PREFIX -DCUDA_ARCHITECTURE=52 + cmake --build . -j + make python - name: ctest run: | cd build ctest - name: pytest run: | - pytest + pytest diff --git a/netsci.yml b/netsci.yml new file mode 100644 index 0000000..7672c72 --- /dev/null +++ b/netsci.yml @@ -0,0 +1,11 @@ +name: netsci +channels: + - conda-forge anaconda +dependencies: + - python=3.10 + - anaconda::cmake + - conda-forge::numpy + - conda-forge::doxygen + - conda-forge::boost + - conda-forge::swig + - conda-forge::pytest \ No newline at end of file