forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python): split out temp wheel builds (datahub-project#12157)
- Loading branch information
1 parent
a4d8a5b
commit d297424
Showing
14 changed files
with
304 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Python Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- ".github/workflows/python-build-pages.yml" | ||
- "metadata-ingestion/**" | ||
- "metadata-ingestion-modules/**" | ||
- "metadata-models/**" | ||
pull_request: | ||
branches: | ||
- "**" | ||
paths: | ||
- ".github/workflows/python-build-pages.yml" | ||
- "metadata-ingestion/**" | ||
- "metadata-ingestion-modules/**" | ||
- "metadata-models/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy-pages: | ||
runs-on: ubuntu-latest | ||
if: ${{ vars.CLOUDFLARE_WHEELS_PROJECT_NAME != '' }} | ||
|
||
name: Python Wheels | ||
permissions: | ||
contents: read | ||
pull-requests: read | ||
deployments: write | ||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "zulu" | ||
java-version: 17 | ||
- uses: gradle/actions/setup-gradle@v3 | ||
- uses: acryldata/sane-checkout-action@v3 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/uv | ||
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }} | ||
- name: Build Python wheel site | ||
run: | | ||
./gradlew :python-build:buildSite | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Publish | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ vars.CLOUDFLARE_WHEELS_PROJECT_NAME }} | ||
workingDirectory: python-build | ||
directory: site | ||
gitHubToken: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
/wheels | ||
/site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
id 'base' | ||
} | ||
|
||
ext { | ||
python_executable = 'python3' | ||
} | ||
|
||
task checkPythonVersion(type: Exec) { | ||
commandLine python_executable, '-c', | ||
'import sys; sys.version_info >= (3, 8), f"Python version {sys.version_info} is too old"' | ||
} | ||
|
||
task buildWheels(type: Exec, dependsOn: [ | ||
checkPythonVersion, | ||
':metadata-ingestion:buildWheel', | ||
':metadata-ingestion-modules:airflow-plugin:buildWheel', | ||
':metadata-ingestion-modules:dagster-plugin:buildWheel', | ||
':metadata-ingestion-modules:prefect-plugin:buildWheel', | ||
':metadata-ingestion-modules:gx-plugin:buildWheel', | ||
]) { | ||
commandLine python_executable, "copy_wheels.py" | ||
} | ||
|
||
task buildSite(type: Exec, dependsOn: [buildWheels]) { | ||
commandLine python_executable, "build_site.py" | ||
} |
Oops, something went wrong.