Colab #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: maximize build space | |
# uses: easimon/maximize-build-space@fc881a613ad2a34aca9c9624518214ebc21dfc0c # ratchet:easimon/maximize-build-space@v10 | |
uses: cameronraysmith/maximize-build-space@fdf0c06b18d92be98aa64cb68ae4ea4c9bc4794d # ratchet:cameronraysmith/maximize-build-space@print-usage | |
with: | |
root-reserve-mb: 4096 | |
swap-size-mb: 1024 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-codeql: "true" | |
remove-docker-images: "true" | |
- 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" |