aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build_caldp.yaml
blob: 160175bf6c7fef0b525cb5a4f280dd0a8c7e4d16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: build CALDP

on:
  push:
    branches:
      - master
    paths:
      - caldp/**
  pull_request:
    paths:
      - caldp/**
  workflow_dispatch:
    inputs:
      release:
        description: CALDP release (can also be `latest`, `stable`)
        type: string
        required: false

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release }}
  cancel-in-progress: true

jobs:
  release:
    name: name of release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - id: release
        run: echo "release=$(basename $(readlink -f caldp/${{ inputs.release || 'latest' }}))" >> $GITHUB_OUTPUT
      - run: echo "release=${{ steps.release.outputs.release }}"
    outputs:
      release: ${{ steps.release.outputs.release }}
  build:
    needs: [ release ]
    name: build CALDP `${{ needs.release.outputs.release }}` (${{ matrix.runs-on }})
    runs-on: ${{ matrix.runs-on }}
    strategy:
      matrix:
        runs-on: [ ubuntu-latest, macos-latest ]
    defaults:
      run:
        shell: micromamba-shell {0}
    steps:
      - uses: actions/checkout@v4
      - uses: mamba-org/setup-micromamba@v1
        with:
          environment-name: caldp-${{ runner.os }}
          environment-file: caldp/${{ needs.release.outputs.release }}/latest-${{ runner.os == 'Linux' && 'linux' || 'macos' }}.yml
          init-shell: none
          generate-run-shell: true
      - run: pip list