From e4814d51c8bf61eae21e1227a6f9c681f9bc0140 Mon Sep 17 00:00:00 2001 From: DinoBektesevic Date: Tue, 20 Dec 2022 13:51:07 -0800 Subject: [PATCH] Use setup miniconda action instead. Better isolation of environment compared to relying on setup python actions and activating various base environments on shell login. See github.com/actions/setup-python/issues/162 --- .github/workflows/test_build.yaml | 33 ++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml index 61bd5023..20d640f5 100644 --- a/.github/workflows/test_build.yaml +++ b/.github/workflows/test_build.yaml @@ -3,25 +3,34 @@ on: push: branches: - ci + +env: + CONDA: /epyc/opt/anaconda-2019 + jobs: test-build: + name: Test build runs-on: self-hosted + defaults: + run: + shell: bash -leo pipefail {0} steps: - - name: Link to a more modern git - run: echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Setup miniconda + uses: conda-incubator/setup-miniconda@v2.2.0 + with: + activate-environment: kbmod_build_test + python-version: '3.10' + remove-profiles: false + - name: Get newer git + run: | + conda init bash -d -v + conda install git - name: Checkout code uses: actions/checkout@v3 with: - submodules: recursive - - name: Set-up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' + submodules: recursive - name: Setup nvcc run: echo "/usr/local/cuda-11.8/bin" >> $GITHUB_PATH - name: Build KBMoD - run: python -m pip install . - - - - \ No newline at end of file + run: | + python -m pip install .