Skip to content

Commit

Permalink
Add conda build on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed Mar 9, 2024
1 parent 539ab97 commit c6ebd29
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -20,23 +20,29 @@ 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
# Linux we are running in minimal containers.
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
Expand Down

0 comments on commit c6ebd29

Please sign in to comment.