Skip to content

[pre-commit.ci] pre-commit autoupdate #110

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #110

Workflow file for this run

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: 30720
swap-size-mb: 2048
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@692973e3d937129bcbf40652eb9f2f61becf3332 # 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 constructorscript/
conda list
CONDA_SOLVER=libmamba CONDA_VERBOSITY=1 CONDA_OVERRIDE_CUDA="12.2" constructor conda/colab/ --output-dir=constructorscript/
- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa" # v2
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}"
- name: "Upload environment to GCS"
uses: "google-github-actions/upload-cloud-storage@22121cd842b0d185e042e28d969925b538c33d77" # ratchet:google-github-actions/upload-cloud-storage@v2
with:
path: "constructorscript"
destination: "pyrovelocity/data/scripts"
parent: false
glob: "*.sh"