-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (51 loc) · 1.93 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
name: Build Sycomore
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: "ubuntu-latest", packaging: "conda", python: "python" }
- { os: "macos-latest", packaging: "conda", python: "python" }
- { os: "windows-latest", packaging: "conda", python: "python" }
env:
WORKSPACE: "${{ github.workspace }}"
defaults:
run:
shell: ${{ contains(matrix.os, 'windows') && 'pwsh' || 'bash -l {0}' }}
steps:
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash powershell
environment-name: sycomore
create-args: python
if: ${{ matrix.packaging == 'conda' }}
- 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 ${{ env.MAMBA_EXE }}
if: ${{ matrix.packaging == 'conda' }}
- name: Set-up (${{ matrix.packaging }})
run: ${{ matrix.python }} .ci/build/${{ matrix.packaging }}.py
if: ${{ matrix.packaging != 'conda' }}
- name: Build sycomore
run: ${{ matrix.python }} ./.ci/build/build.py
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.os }}
path: install/
- name: Run tests
run: ${{ matrix.python }} ./.ci/build/post_build.py