-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (70 loc) · 2.47 KB
/
colab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Colab
on:
workflow_dispatch:
inputs:
debug_enabled:
description: "Run with tmate.io debugging enabled"
required: true
type: boolean
default: false
push:
paths:
- "conda/colab/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
environment:
name: ${{ matrix.os }}, Python ${{ matrix.pyver }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu]
pyver: ["3.10"]
env:
PYTHONUNBUFFERED: True
steps:
- name: "Print github context"
run: |
echo "EVENT_NAME:" "$GITHUB_EVENT_NAME"
echo " REF:" "$GITHUB_REF"
echo " HEAD_REF:" "$GITHUB_HEAD_REF"
echo " BASE_REF:" "$GITHUB_BASE_REF"
echo " SHA:" "$GITHUB_SHA"
- name: Retrieve the source code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: "Setup tmate debug session"
uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # ratchet:mxschmitt/action-tmate@v3
if: ${{ inputs.debug_enabled }}
- name: "Install constructor"
run: |
source $CONDA/etc/profile.d/conda.sh
conda create -n constructor -c conda-forge -yq constructor conda-libmamba-solver
conda activate constructor
set -x
which constructor
constructor --version
- name: "Construct environment"
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate constructor
set -x
mkdir -p scripts/
conda list
CONDA_SOLVER=libmamba CONDA_VERBOSITY=1 CONDA_OVERRIDE_CUDA="11.8" constructor conda/colab/ --output-dir=scripts/
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@3a3c4c57d294ef65efaaee4ff17b22fa88dd3c69" # ratchet:google-github-actions/auth@v1
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}"
- name: "Upload environment to GCS"
uses: "google-github-actions/upload-cloud-storage@e95a15f226403ed658d3e65f40205649f342ba2c" # ratchet:google-github-actions/upload-cloud-storage@v1
with:
path: "scripts"
destination: "pyrovelocity/data"