-
Notifications
You must be signed in to change notification settings - Fork 399
54 lines (44 loc) · 1.57 KB
/
step_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
name: build
run-name: Build test
on:
workflow_call:
inputs:
upload:
type: boolean
required: false
default: false
description: Upload build artifacts
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Build package
run: |
python -m pip install build wheel
# NOTE: These builds and verifications of the builds can be done more
# robustly with jupyter-releaser.
#
# Removed the check on size of package as we are distributing tests/ with
# sdist now and they are around 8MB. Seems like original check was to make
# sure we are not distributing node_modules and we are quite safe with that
# with hatch build system.
#
# Build jupytext package
python -m build
# Build lab extension(s)
npm pack --pack-destination dist jupyterlab/packages/*
# Check that the lab is there
if (($(tar -tf dist/*.tar.gz | grep jupyterlab/jupyterlab_jupytext/labextension/package.json$ | wc -l)==0)); then echo "Missing jupyterlab_jupytext" && exit 1; fi
# Install package and extension
python -m pip install dist/*.tar.gz
echo "Install went OK"
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
if: ${{ inputs.upload }}