From f7fd1c3c01d413202f3e916f1269dc8dfe6ad957 Mon Sep 17 00:00:00 2001 From: amstokely Date: Mon, 27 Nov 2023 09:59:56 -0700 Subject: [PATCH] feat: enabled self-hosted CI. --- .github/workflows/netsci_CI.yml | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/netsci_CI.yml b/.github/workflows/netsci_CI.yml index 860a964..9f140bc 100644 --- a/.github/workflows/netsci_CI.yml +++ b/.github/workflows/netsci_CI.yml @@ -1,33 +1,32 @@ name: netcalc -on: [ push, workflow_dispatch ] +on: [push] jobs: run: - runs-on: [ self-hosted ] + runs-on: [self-hosted] + container: dvcorg/cml-py3:latest env: repo_token: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - - name: Update linux env - run: apt-get update - - uses: mamba-org/setup-micromamba@v1 + - name: Setup anaconda + uses: conda-incubator/setup-miniconda@v2 with: - micromamba-version: '1.3.1-0' - environment-file: netsci.yml - init-shell: >- - bash - powershell - cache-environment: true - post-cleanup: 'all' + 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 - name: Install netcalc dependencies run: | - conda install -c conda-forge swig boost numpy cmake pytest + conda env create -f netsci.yml + conda activate netsci - 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