-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kevin Su <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,20 +26,19 @@ jobs: | |
run: | | ||
echo "PACKAGES=$(find examples -maxdepth 1 -type d -exec basename '{}' \; \ | ||
| grep -v -e 'testing' -e 'examples' \ | ||
| grep -v -e 'airflow_plugin' -e 'forecasting_sales' -e 'onnx_plugin' -e 'feast_integration' -e 'modin_plugin' \ | ||
| grep -v -e 'airflow_plugin' -e 'forecasting_sales' -e 'onnx_plugin' -e 'feast_integration' -e 'modin_plugin' -e 'sagemaker_inference_agent' \ | ||
| sort \ | ||
| jq --raw-input . \ | ||
| jq --slurp . \ | ||
| jq -c .)" >> "$GITHUB_OUTPUT" | ||
outputs: | ||
packages: "${{ steps.create-example-list.outputs.PACKAGES }}" | ||
serialize_examples: | ||
serialize: | ||
needs: [list_examples] | ||
runs-on: "ubuntu-latest" | ||
env: | ||
FLYTE_SDK_RICH_TRACEBACKS: "0" | ||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python | ||
name: Serialize | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -74,11 +73,46 @@ jobs: | |
- name: Pyflyte package | ||
working-directory: examples/${{ matrix.example }} | ||
run: | | ||
pip freeze | ||
source .venv/bin/activate | ||
pyflyte \ | ||
--pkgs ${{ matrix.example }} package \ | ||
--image mindmeld="ghcr.io/flyteorg/flytecookbook:core-latest" \ | ||
--image borebuster="ghcr.io/flyteorg/flytekit:py3.9-latest" \ | ||
--output spark-package.tgz \ | ||
--output /root/flyte-package.tgz \ | ||
--force | ||
tar -xvf flyte-package.tgz | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: snacks-${{ matrix.example }} | ||
path: examples/${{ matrix.example }}/**/*.pb | ||
|
||
# Download all artifacts generated from the previous job. Startup a sandbox cluster then register all of them. | ||
register: | ||
name: Register example to sandbox | ||
runs-on: ubuntu-latest | ||
needs: [ "serialize" ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: "0" | ||
- uses: unionai/[email protected] | ||
- name: setup download artifact dir | ||
run: | | ||
mkdir download-artifact | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: ./download-artifact/ | ||
- name: setup sandbox | ||
run: | | ||
flytectl demo start | ||
flytectl config init | ||
- name: Register examples | ||
uses: unionai/[email protected] | ||
with: | ||
flytesnacks: false | ||
proto: ./download-artifact/**/* | ||
project: flytesnacks | ||
version: "latest" | ||
domain: development |
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