Update P5-OceanWarming-for-students.ipynb #52
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: tests environments | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
# build-ubuntu: | |
# | |
# name: ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# defaults: | |
# run: | |
# shell: bash -l {0} | |
# continue-on-error: ${{ matrix.experimental }} | |
# strategy: | |
# max-parallel: 12 | |
# fail-fast: false | |
# matrix: | |
# python-version: ["3.11"] | |
# os: ["ubuntu-latest"] | |
# experimental: [false] | |
# | |
# steps: | |
# - uses: actions/checkout@v4 | |
# | |
# - name: Set environment variables | |
# run: | | |
# echo "CONDA_ENV_FILE=practice/environment/coiled/environment-coiled-pinned-binder.yml" >> $GITHUB_ENV | |
# echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
# echo "LOG_FILE=Py${{matrix.python-version}}-${{matrix.os}}.log" >> $GITHUB_ENV | |
# | |
# - name: Setup Micromamba ${{ matrix.python-version }} | |
# uses: mamba-org/setup-micromamba@v2 | |
# with: | |
# micromamba-version: '1.5.10-0' | |
# environment-name: ds2-tests | |
# environment-file: ${{ env.CONDA_ENV_FILE }} | |
# init-shell: bash | |
# cache-environment: true | |
# cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | |
# create-args: >- | |
# python=${{matrix.python-version}} | |
# | |
# - name: Version info | |
# run: | | |
# micromamba info | |
# micromamba list > $LOG_FILE | |
# | |
# - name: Save tests log as artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: Build-${{matrix.python-version}}-${{matrix.os}} | |
# path: ${{env.LOG_FILE}} | |
# retention-days: 90 | |
# | |
# build-macos: | |
# | |
# name: ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# defaults: | |
# run: | |
# shell: bash -l {0} | |
# continue-on-error: ${{ matrix.experimental }} | |
# strategy: | |
# max-parallel: 12 | |
# fail-fast: false | |
# matrix: | |
# python-version: ["3.11"] | |
# os: ["macos-latest"] | |
# experimental: [false] | |
# | |
# steps: | |
# - uses: actions/checkout@v4 | |
# | |
# - name: Set environment variables | |
# run: | | |
# echo "CONDA_ENV_FILE=practice/environment/coiled/environment-coiled-pinned-binder.yml" >> $GITHUB_ENV | |
# echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
# echo "LOG_FILE=Py${{matrix.python-version}}-${{matrix.os}}.log" >> $GITHUB_ENV | |
# | |
# - name: Setup Micromamba ${{ matrix.python-version }} | |
# uses: mamba-org/setup-micromamba@v2 | |
# with: | |
# micromamba-version: '1.5.10-0' | |
# environment-name: ds2-tests | |
# environment-file: ${{ env.CONDA_ENV_FILE }} | |
# init-shell: bash | |
# cache-environment: true | |
# cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | |
# create-args: >- | |
# python=${{matrix.python-version}} | |
# | |
# - name: Version info | |
# run: | | |
# micromamba info | |
# micromamba list > $LOG_FILE | |
# | |
# - name: Save tests log as artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: Build-${{matrix.python-version}}-${{matrix.os}} | |
# path: ${{env.LOG_FILE}} | |
# retention-days: 90 | |
build-windows: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
max-parallel: 12 | |
fail-fast: false | |
matrix: | |
python-version: ["3.11"] | |
os: ["windows-latest"] | |
experimental: [false] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set environment variables | |
run: | | |
echo "CONDA_ENV_FILE=practice/environment/coiled/environment-coiled-pinned-binder-windows.yml" >> $GITHUB_ENV | |
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV | |
echo "LOG_FILE=Py${{matrix.python-version}}-${{matrix.os}}.log" >> $GITHUB_ENV | |
- name: Download Google SDK | |
shell: cmd | |
run: | | |
curl.exe -o gcloud-sdk.zip --url https://storage.googleapis.com/cloud-sdk-release/google-cloud-cli-502.0.0-windows-x86_64.zip | |
tar -xf gcloud-sdk.zip | |
mv .\google-cloud-sdk "C:\Program Files\google-cloud-sdk" | |
- name: Help Google SDK | |
shell: cmd | |
run: | | |
cd /d C:\Program Files\google-cloud-sdk | |
dir . | |
.\install.bat --help | |
- name: Install Google SDK 1 | |
shell: cmd | |
run: | | |
cd /d C:\Program Files\google-cloud-sdk | |
.\install.bat --quiet --path-update true | |
- name: Install Google SDK 2 | |
shell: cmd | |
run: | | |
setx PATH "%PATH%;C:\Program Files\google-cloud-sdk\bin" | |
- name: Install Google SDK 3 | |
shell: cmd | |
run: | | |
echo %PATH:;=&echo.% | |
- name: Check Google SDK 1 | |
shell: cmd | |
run: | | |
"C:\Program Files\google-cloud-sdk\bin\gcloud" info | |
- name: Check Google SDK 2 | |
shell: cmd | |
run: | | |
gcloud info | |
- name: Setup Micromamba ${{ matrix.python-version }} | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
micromamba-version: '1.5.10-0' | |
environment-name: ds2-tests | |
environment-file: ${{ env.CONDA_ENV_FILE }} | |
init-shell: bash | |
cache-environment: true | |
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" | |
create-args: >- | |
python=${{matrix.python-version}} | |
- name: Version info | |
run: | | |
micromamba info | |
micromamba list > $LOG_FILE | |
- name: Save tests log as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Build-${{matrix.python-version}}-${{matrix.os}} | |
path: ${{env.LOG_FILE}} | |
retention-days: 90 |