-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (109 loc) · 3.35 KB
/
ci-calculix.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
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
name: ci-calculix
# bump 1
# libnetcdf4,netcdf4 are meshio indirect dependencies...
# Consider making meshio an optional dependency?
on:
workflow_dispatch:
inputs:
build_selection:
description: 'Build Selection'
required: true
type: string
default: "gmsh,ifcopenshell,libnetcdf4,netcdf4,h5py"
adapy_branch:
description: 'Adapy Branch'
required: true
type: string
default: "main"
description:
description: 'Release Description'
required: true
type: string
conda_label:
description: 'Conda channel name'
required: false
type: string
python_versions:
description: 'Python Versions'
required: true
type: string
default: "3.11,3.12"
platforms:
description: 'Platforms'
required: true
type: string
default: "windows-latest"
variants:
description: 'Build variants'
required: true
type: string
default: "build_type=debug,build_type=release"
extra_build_args:
description: 'Extra build arguments'
required: true
type: string
default: " -m __root__/src/code_aster/common.yaml -c https://repo.prefix.dev/code-aster"
push:
paths:
- .github/workflows/ci-adapydeps.yml
branches:
- donotrun
jobs:
env:
runs-on: ubuntu-latest
outputs:
conda_user: krandedev
pkg_dir: src
use_quetz: "True"
# This is where the conda user and label should be set
conda_label: ${{ steps.env.outputs.unique_suffix }}
python_versions: ${{ inputs.python_versions }}
platforms: ${{ inputs.platforms }}
variants: ${{ inputs.variants }}
description: ${{ inputs.description }}
extra_build_args: ${{ inputs.extra_build_args }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toposort==1.10
pip install ./src/cpack
- name: dummy step
id: env
shell: python
env:
CONDA_LABEL: ${{ inputs.conda_label }}
run: |
import os
import re
def set_output(name, value):
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f'{name}={value}', file=fh)
# Auto generate Conda label if not manually set
conda_label = os.getenv('CONDA_LABEL', None)
if not conda_label:
conda_label = "adapy-${{ github.run_id }}"
print(f"{conda_label=}")
set_output('unique_suffix', conda_label)
calculix:
uses: ./.github/workflows/conda-build-basic.yml
needs: env
with:
package_name: calculix
job_name: calculix
pkg_dir: src
conda_label: ${{ needs.env.outputs.conda_label }}
conda_user: ${{ needs.env.outputs.conda_user }}
python_versions: ${{ inputs.python_versions }}
platforms: ${{ inputs.platforms }}
variants: ${{ inputs.variants }}
description: ${{ inputs.description }}
build_selection: ${{ inputs.build_selection }}
use_quetz: "True"
extra_build_args: ${{ inputs.extra_build_args }}
secrets: inherit