From c6ebd29d124dc01d4ef778d2f256086611cb9259 Mon Sep 17 00:00:00 2001 From: Julien Lamy Date: Sat, 9 Mar 2024 16:28:09 +0100 Subject: [PATCH] Add conda build on linux --- .github/workflows/build.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25035bc..ab2d992 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ${{ matrix.os }} container: ${{ matrix.container }} - name: ${{ matrix.container || matrix.os }} + name: ${{ matrix.container || matrix.os }}/${{ matrix.packaging }} strategy: fail-fast: false matrix: @@ -20,9 +20,13 @@ jobs: # - { os: "ubuntu-latest", packaging: "apt", container: "ubuntu:focal", python: "python3" } # - { os: "ubuntu-latest", packaging: "apt", container: "ubuntu:jammy", python: "python3" } - { os: "ubuntu-latest", packaging: "apt", container: "ubuntu:noble", python: "python3" } + - { os: "ubuntu-latest", packaging: "conda", python: "python" } - { os: "macos-latest", packaging: "conda", python: "python" } env: WORKSPACE: "${{ github.workspace }}" + defaults: + run: + shell: ${{ contains(matrix.os, 'windows') && 'pwsh' || 'bash -l {0}' }} steps: - name: Provision (Debian, Ubuntu) # Install Python and Git. macOS workers already have this, however for @@ -30,13 +34,15 @@ jobs: run: | apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y git python3 - if: ${{ contains(matrix.container, 'debian') || contains(matrix.container, 'ubuntu') }} + if: ${{ contains(matrix.packaging, 'apt') }} - - name: Provision (macOS) - # Initialize the Conda environment by default - run: | - conda init --all - if: ${{ contains(matrix.os, 'macos') }} + - name: Provision (Micromamba) + uses: mamba-org/setup-micromamba@v1 + with: + init-shell: bash powershell + environment-name: sycomore + create-args: python=3.11 + if: ${{ contains(matrix.packaging, 'conda') }} - name: Checkout latest revision # Only the latest revision is required, as later steps do not depend on