-
Notifications
You must be signed in to change notification settings - Fork 713
46 lines (44 loc) · 1.29 KB
/
build_pex.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
name: Build PEX file
on:
workflow_call:
inputs:
whl-file-name:
required: true
type: string
outputs:
pex-file-name:
description: "PEX file name"
value: ${{ jobs.build_pex.outputs.pex-file-name }}
jobs:
build_pex:
name: Build PEX
runs-on: ubuntu-20.04
outputs:
pex-file-name: ${{ steps.get-pex-filename.outputs.pex-file-name }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.6
uses: actions/setup-python@v5
with:
python-version: 3.6
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python build dependencies
run: pip install -r requirements/build.txt
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.whl-file-name }}
path: dist
- name: Build PEX
run: make pex
- name: Get PEX filename
id: get-pex-filename
run: echo "pex-file-name=$(ls dist | grep .pex | cat)" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.get-pex-filename.outputs.pex-file-name }}
path: dist/${{ steps.get-pex-filename.outputs.pex-file-name }}