forked from aehrc/pathling
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (61 loc) · 2.25 KB
/
python-pre-release.yml
File metadata and controls
70 lines (61 loc) · 2.25 KB
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
# This workflow builds a pre-release version of the Python API for Pathling and deploys it to PyPI.
name: "Python pre-release"
# This workflow is triggered manually, and requires the input of a segment identifier. This will be
# appended to the version, e.g. 6.1.3-dev0.
on:
workflow_dispatch:
inputs:
segmentIdentifier:
description: "Pre-release identifier"
required: true
default: ".dev0"
env:
# The add-exports and add-opens flags are required for Java 17
MAVEN_OPTS: --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED
jobs:
deploy-python-pre-release:
name: Python pre-release
environment: pypi
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# This is required so that git-commit-id-plugin can find the latest tag.
fetch-depth: 0
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "zulu"
- name: Set up Python 3.8
uses: actions/setup-python@v4
id: python-install
with:
python-version: 3.8
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Python packages
uses: actions/cache@v4
with:
path: /home/runner/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('lib/python/requirements/dev.txt', 'lib/python/requirements/package.txt') }}
- name: Run deploy goal (pre-release)
env:
PYSPARK_PYTHON: ${{ steps.python-install.outputs.python-path }}
PYSPARK_DRIVER_PYTHON: ${{ steps.python-install.outputs.python-path }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
mvn --batch-mode deploy \
-pl lib/python -am \
-PpythonPreRelease \
-DskipTests \
-Dpathling.pyapi.version.qualifier=${{ github.event.inputs.segmentIdentifier }}
timeout-minutes: 30