-
Notifications
You must be signed in to change notification settings - Fork 10
129 lines (113 loc) · 4.21 KB
/
Copy pathconda.yml
File metadata and controls
129 lines (113 loc) · 4.21 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: conda
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
# Weekly dependency drift check against current conda-forge packages.
- cron: "0 4 * * 1"
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
conda-build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
label: linux-64
variants: "{nrgljubljana_build_tests: ['ON'], nrgljubljana_build_jobs: ['2'], nrgljubljana_test_jobs: ['2']}"
openblas_coretype: ""
- os: ubuntu-24.04-arm
label: linux-aarch64
variants: "{c_compiler: ['clang'], cxx_compiler: ['clangxx'], blas_impl: ['openblas'], nrgljubljana_build_tests: ['ON'], nrgljubljana_build_jobs: ['2'], nrgljubljana_test_jobs: ['2']}"
openblas_coretype: ARMV8
- os: macos-14
label: macos
variants: "{blas_impl: ['accelerate'], nrgljubljana_build_tests: ['ON'], nrgljubljana_build_jobs: ['2'], nrgljubljana_test_jobs: ['2']}"
openblas_coretype: ""
- os: macos-14
label: macos-eigen34
variants: "{blas_impl: ['accelerate'], eigen: ['3.4.*'], nrgljubljana_build_tests: ['ON'], nrgljubljana_build_jobs: ['2'], nrgljubljana_test_jobs: ['2']}"
openblas_coretype: ""
name: conda build (${{ matrix.label }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
env:
CONDA_BLD_PATH: ${{ github.workspace }}/conda-bld
NRGLJUBLJANA_CONDA_GIT_URL: file://${{ github.workspace }}
NRGLJUBLJANA_CONDA_GIT_REV: ${{ github.sha }}
OMPI_MCA_memory: ^patcher
OPENBLAS_NUM_THREADS: "1"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest
channels: conda-forge
channel-priority: strict
auto-update-conda: false
auto-activate-base: true
- name: Install conda-build
run: conda install -n base -y --override-channels -c conda-forge conda-build
- name: Configure Linux ARM OpenBLAS
if: ${{ matrix.openblas_coretype != '' }}
run: echo "OPENBLAS_CORETYPE=${{ matrix.openblas_coretype }}" >> "$GITHUB_ENV"
- name: Render recipe
run: |
retry_conda() {
local attempt
for attempt in 1 2 3; do
if "$@"; then
return 0
fi
if [ "${attempt}" -eq 3 ]; then
return 1
fi
conda clean -y --index-cache --packages --tarballs
sleep $((attempt * 20))
done
}
retry_conda conda render --override-channels -c conda-forge --variants "${{ matrix.variants }}" recipe
- name: Build package
run: |
retry_conda() {
local attempt
for attempt in 1 2 3; do
if "$@"; then
return 0
fi
if [ "${attempt}" -eq 3 ]; then
return 1
fi
conda clean -y --index-cache --packages --tarballs
sleep $((attempt * 20))
done
}
retry_conda conda build --override-channels -c conda-forge --no-anaconda-upload --variants "${{ matrix.variants }}" recipe
- name: Upload conda test logs
uses: actions/upload-artifact@v7
if: failure()
with:
name: conda-test-logs-${{ matrix.label }}
path: |
${{ env.CONDA_BLD_PATH }}/**/*.log
${{ env.CONDA_BLD_PATH }}/**/work/build/Testing/Temporary/LastTest.log
${{ env.CONDA_BLD_PATH }}/**/work/build/Testing/Temporary/LastTestsFailed.log
${{ env.CONDA_BLD_PATH }}/**/work/build/test/**/log
if-no-files-found: ignore
- name: Upload conda packages
uses: actions/upload-artifact@v7
if: always()
with:
name: conda-packages-${{ matrix.label }}
path: |
${{ env.CONDA_BLD_PATH }}/**/nrgljubljana-*.conda
${{ env.CONDA_BLD_PATH }}/**/nrgljubljana-*.tar.bz2
if-no-files-found: warn