|
| 1 | +name: Build Metabase arrow-flight-sql Driver |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - name: Clone Metabase repository |
| 15 | + uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + repository: metabase/metabase |
| 18 | + path: metabase |
| 19 | + |
| 20 | + - name: Checkout driver code |
| 21 | + uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + path: metabase/modules/drivers/arrow-flight-sql |
| 24 | + |
| 25 | + - name: List driver files for debugging |
| 26 | + run: | |
| 27 | + echo "Listing contents of metabase/modules/drivers/arrow-flight-sql:" |
| 28 | + ls -R metabase/modules/drivers/ |
| 29 | + ls -R metabase/modules/drivers/arrow-flight-sql |
| 30 | +
|
| 31 | + - name: Register arrow-flight-sql in deps.edn |
| 32 | + working-directory: ./metabase |
| 33 | + run: | |
| 34 | + cp modules/drivers/arrow-flight-sql/ci/deps.edn modules/drivers/deps.edn |
| 35 | + echo "--- Verifying modules/drivers/deps.edn content ---" |
| 36 | + cat modules/drivers/deps.edn |
| 37 | + echo "----------------------------------------------------" |
| 38 | +
|
| 39 | +
|
| 40 | + - name: Set up JDK 21 |
| 41 | + uses: actions/setup-java@v4 |
| 42 | + with: |
| 43 | + distribution: 'temurin' |
| 44 | + java-version: '21' |
| 45 | + |
| 46 | + - name: Set up Node.js |
| 47 | + uses: actions/setup-node@v4 |
| 48 | + with: |
| 49 | + node-version: 'lts/*' |
| 50 | + |
| 51 | + - name: Install Yarn 1.x |
| 52 | + run: | |
| 53 | + npm install -g yarn@1 |
| 54 | + yarn --version |
| 55 | +
|
| 56 | + - name: Set up Clojure |
| 57 | + uses: DeLaGuardo/setup-clojure@12.3 |
| 58 | + with: |
| 59 | + cli: latest |
| 60 | + |
| 61 | + - name: Build driver |
| 62 | + working-directory: ./metabase |
| 63 | + run: | |
| 64 | + chmod +x ./bin/build-driver.sh |
| 65 | + ./bin/build-driver.sh arrow-flight-sql |
| 66 | +
|
| 67 | + - name: Upload driver artifact |
| 68 | + uses: actions/upload-artifact@v4 |
| 69 | + if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 70 | + with: |
| 71 | + name: metabase-arrow-flight-sql-driver |
| 72 | + path: metabase/resources/modules/arrow-flight-sql.metabase-driver.jar |
| 73 | + if-no-files-found: error |
0 commit comments