-
Notifications
You must be signed in to change notification settings - Fork 262
60 lines (49 loc) · 1.57 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
60
name: build
on: [workflow_dispatch, workflow_call]
jobs:
build-sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Build
run: |
# add packages that are supposed to be built to this list
for package in fairchem-core fairchem-data-oc fairchem-demo-ocpapi fairchem-applications-cattsunami
do
pushd packages/$package
hatch build
popd
done
# unfortunately there isn't a clean way to upload artifacts separately so just copy
# for each new package right now
- name: Upload core artifact
uses: actions/upload-artifact@v4
with:
name: dist-core
path: dist-core/*
- name: Upload data-oc artifact
uses: actions/upload-artifact@v4
with:
name: dist-data-oc
path: dist-data-oc/*
- name: Upload demo-ocpapi artifact
uses: actions/upload-artifact@v4
with:
name: dist-demo-ocpapi
path: dist-demo-ocpapi/*
- name: Upload applications-cattsunami artifact
uses: actions/upload-artifact@v4
with:
name: dist-applications-cattsunami
path: dist-applications-cattsunami/*