Skip to content

Commit

Permalink
Ensure package will be releasable before build
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 9, 2023
1 parent 4149e36 commit d788fe1
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/build-hogql-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,34 @@ on:
- hogql_parser/**
- .github/workflows/build-hogql-parser.yml

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
check-version:
name: Check version legitimacy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Compare versions
shell: bash
run: |
published=$(curl -fSsl https://pypi.org/pypi/hogql-parser/json | jq -r '.info.version')
local=$(python hogql_parser/setup.py --version)
if [[ "$published" == "$local" ]]; then
echo "Version $local is already published on PyPI"
exit 1
fi
build-wheels:
name: Build wheels on ${{ matrix.os }}
needs: check-version
# if: github.ref == 'refs/heads/master' TODO: Only build on master once the containers build on ARM
runs-on: ${{ matrix.os }}
timeout-minutes: 120
timeout-minutes: 120 # The Linux ARM builds are painfully slow
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12]

Expand All @@ -29,7 +50,7 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
platforms: arm64

- uses: actions/setup-python@v3

Expand Down

0 comments on commit d788fe1

Please sign in to comment.