diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 6ee866781d..b578501b59 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,7 +1,13 @@ name: build_wheels # Call this workflow from other workflows in the repository by specifying "uses: ./.github/workflows/build_wheels.yml" -on: [workflow_dispatch, workflow_call] +# Developers who are starting a new release should use this workflow to ensure wheels will be built correctly. +# Devs should check out their fork, add a tag to the last master commit on their fork, and run the release off of their fork on the added tag to ensure wheels will be built correctly. +on: + workflow_dispatch: + tags: + - 'v*.*.*' + workflow_call: jobs: get-version: @@ -134,7 +140,7 @@ jobs: verify-python-wheels: runs-on: ${{ matrix.os }} - needs: [build-python-wheel, build-source-distribution] + needs: [build-python-wheel, build-source-distribution, get-version] strategy: matrix: os: [ubuntu-latest, macos-10.15 ] @@ -153,6 +159,7 @@ jobs: else echo "Succeeded!" fi + VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }} steps: - name: Setup Python id: setup-python @@ -190,6 +197,19 @@ jobs: - name: Install OS X dependencies if: matrix.os == 'macos-10.15' run: brew install coreutils + # Validate that the feast version installed is not development and is the correct version of the tag we ran it off of. + - name: Validate Feast Version + run: | + VERSION_REGEX='[0-9]+\.[0-9]+\.[0-9]+' + OUTPUT_REGEX='^Feast SDK Version: "$VERSION_REGEX"$' + VERSION_OUTPUT=$(feast version) + VERSION=$(echo $VERSION_OUTPUT | grep -oE "$VERSION_REGEX") + OUTPUT=$(echo $VERSION_OUTPUT | grep -E "$REGEX") + if [ -n "$OUTPUT" ] && [ "$VERSION" = "$VERSION_WITHOUT_PREFIX" ]; then + echo "Correct Feast Version Installed" + else + echo "$VERSION_OUTPUT from installed wheel is not in the correct format or doesn't have the right version $VERSION." + fi - name: Smoke test run: | feast init test_repo @@ -198,6 +218,7 @@ jobs: echo "$TEST_SCRIPT" > run-and-wait.sh bash run-and-wait.sh feast serve bash run-and-wait.sh feast ui + # We disable this test for the Python 3.10 binary since it does not include Go. - name: Smoke test with go if: matrix.python-version != '3.10' || matrix.os == 'ubuntu-latest'