-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (52 loc) · 2.25 KB
/
build.yml
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
53
54
55
56
57
58
59
name: Build
on: push
defaults:
run:
shell: bash -i -l -e -o pipefail {0}
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
name: ${{ matrix.container || matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# WARNING: requires odil ≥ 0.12.2
# - { os: "ubuntu-latest", packaging: "apt", container: "debian:bullseye", python: "python3" }
- { os: "ubuntu-latest", packaging: "apt", container: "debian:bookworm", python: "python3" }
# - { 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: "macos-latest", packaging: "conda", python: "python" }
env:
WORKSPACE: "${{ github.workspace }}"
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') }}
- name: Provision (macOS)
# Initialize the Conda environment by default
run: |
conda init --all
if: ${{ contains(matrix.os, 'macos') }}
- name: Checkout latest revision
# Only the latest revision is required, as later steps do not depend on
# tags.
run: |
git config --global init.defaultBranch master
git config --global --add safe.directory '*'
git init .
git remote add origin ${{ github.server_url }}/${{ github.repository }}
git fetch origin --depth=1 ${{ github.ref }}
git checkout ${{ github.ref_name }}
- name: Set-up (${{ matrix.packaging }})
run: ${{ matrix.python }} .ci/build/${{ matrix.packaging }}.py
- name: Build
run: ${{ matrix.python }} ./.ci/build/build.py
- name: Run tests
run: ${{ matrix.python }} ./.ci/build/post_build.py