-
Notifications
You must be signed in to change notification settings - Fork 691
82 lines (80 loc) · 2.71 KB
/
build_whl.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
name: Build WHL file
on:
workflow_call:
outputs:
whl-file-name:
description: "WHL file name"
value: ${{ jobs.build_whl.outputs.whl-file-name }}
tar-file-name:
description: "TAR file name"
value: ${{ jobs.build_whl.outputs.tar-file-name }}
jobs:
build_whl:
name: Build WHL
runs-on: ubuntu-20.04
outputs:
whl-file-name: ${{ steps.get-whl-filename.outputs.whl-file-name }}
tar-file-name: ${{ steps.get-tar-filename.outputs.tar-file-name }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Install Ubuntu dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get install -y gettext sudo sqlite3 binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf
- name: Set up Python 3.6
uses: actions/setup-python@v5
with:
python-version: 3.6
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Javascript dependencies
run: |
yarn --frozen-lockfile
npm rebuild node-sass
- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache C extensions
uses: actions/cache@v4
with:
path: cext_cache
key: ${{ runner.os }}-cext-${{ hashFiles('requirements/cext*.txt') }}
restore-keys: |
${{ runner.os }}-cext-
- name: Install Python build dependencies
run: pip install -r requirements/build.txt
- name: Build Kolibri
run: make dist
- name: Get WHL filename
id: get-whl-filename
run: echo "whl-file-name=$(ls dist | grep .whl | cat)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.get-whl-filename.outputs.whl-file-name }}
path: dist/${{ steps.get-whl-filename.outputs.whl-file-name }}
- name: Get TAR filename
id: get-tar-filename
run: echo "tar-file-name=$(ls dist | grep .tar | cat)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.get-tar-filename.outputs.tar-file-name }}
path: dist/${{ steps.get-tar-filename.outputs.tar-file-name }}