Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Apr 23, 2024
1 parent 21143ed commit 5a91a8c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/checks_new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/serialize-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ serialize() {
--image "$2" \
--image mindmeld="ghcr.io/flyteorg/flytecookbook:core-latest" \
--image borebuster="ghcr.io/flyteorg/flytekit:py3.9-latest" \
--output /root/flyte-package.tgz \
--output flyte-package.tgz \
--force
}

Expand Down

0 comments on commit 5a91a8c

Please sign in to comment.