Skip to content

Commit

Permalink
ci: Disable duckdb tests while caching has issues (#3157)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Jul 28, 2023
1 parent 377c027 commit 9068678
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
6 changes: 5 additions & 1 deletion .github/actions/build-prqlc/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
profile:
description: Build profile option; `dev` or `release`.
required: true
features:
description: Features to enable
required: false
default: ""
outputs:
artifact-name:
description: The name of the artifact
Expand All @@ -28,7 +32,7 @@ runs:
save-if:
${{ (github.ref == 'refs/heads/main') && contains(inputs.target,
'musl') }}
shared-key: rust-${{ inputs.target }}
shared-key: rust-${{ inputs.target }}-${{ inputs.features }}
prefix-key: ${{ env.version }}

- if: runner.os == 'Linux'
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ jobs:
with:
os: ${{ matrix.os }}
target: ${{ matrix.target }}
# We previously ran with these, but removing until
# https://github.com/duckdb/duckdb-rs/issues/178 is fixed given compile
# times
# # Autoformatting doesn't make this clear to read, but this tertiary
# # expression states to run:
# # - External DB integration tests — `--features=test-dbs-external`
# # on Linux
# # - No features on Windows
# # - Internal DB integration tests — `--features=test-dbs` otherwise
# #
# # We'd like to reenable on Windows, ref https://github.com/wangfenjin/duckdb-rs/issues/179.
# ${{ matrix.target == 'x86_64-unknown-linux-gnu' && 'test-dbs-external' || matrix.target != 'x86_64-pc-windows-msvc' && 'test-dbs' || '' }}
features: ""

lint-megalinter:
uses: ./.github/workflows/lint-megalinter.yaml
Expand Down Expand Up @@ -138,8 +151,11 @@ jobs:
# target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
# Match these with the available caches from tests
features: test-dbs
- os: windows-latest
target: x86_64-pc-windows-msvc
features: ""
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,27 @@ jobs:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
features: test-dbs-external

# TODO: potentially enable these
# - os: ubuntu-latest
# target: aarch64-unknown-linux-musl
# - os: macos-latest
# target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
features: test-dbs
- os: windows-latest
target: x86_64-pc-windows-msvc
features: ""
# Only run wasm on ubuntu, given it's the same rust target. (There is a
# possibility of having a failure on just one platform, but it's quite
# unlikely. If we do observe this, we can expand, or introduce a
# `test-actually-all.yaml` which accounts for these corner cases without
# using runners & cache space)
- os: ubuntu-latest
target: wasm32-unknown-unknown
features: ""

uses: ./.github/workflows/test-rust.yaml
with:
Expand Down
35 changes: 12 additions & 23 deletions .github/workflows/test-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
target:
type: string
default: ""
features:
type: string
default: ""

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -42,7 +45,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.version }}
shared-key: rust-${{ inputs.target}}
shared-key: rust-${{ inputs.target }}-${{ inputs.features }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: 📎 Clippy
uses: richb-hanover/[email protected]
Expand All @@ -51,22 +54,9 @@ jobs:
# Note that `--all-targets` doesn't refer to targets like
# `wasm32-unknown-unknown`; it refers to lib / bin / tests etc.
#
# Autoformatting doesn't make this clear to read, but this tertiary
# expression states to run:
# - External DB integration tests — `--features=test-dbs-external`
# on Linux
# - No features on Windows
# - Internal DB integration tests — `--features=test-dbs` otherwise
#
# Below, we also add:
# - Unreferenced snapshots - `--unreferenced=auto` on Linux
#
# We'd like to reenable on Windows, ref https://github.com/wangfenjin/duckdb-rs/issues/179.
args: >
--all-targets --target=${{ inputs.target }} --features=${{
inputs.target == 'x86_64-unknown-linux-gnu' && 'test-dbs-external'
|| inputs.target != 'x86_64-pc-windows-msvc' && 'test-dbs' || '' }}
-- -D warnings
inputs.features }} -- -D warnings
- name: ⌨️ Fmt
uses: richb-hanover/[email protected]
with:
Expand All @@ -80,9 +70,7 @@ jobs:
command: test
args: >
--no-run --locked --target=${{ inputs.target }} --features=${{
inputs.target == 'x86_64-unknown-linux-gnu' && 'test-dbs-external'
|| inputs.target != 'x86_64-pc-windows-msvc' && 'test-dbs' || '' }}
}}
inputs.features }}
- name: Run docker compose
run: docker compose up -d
working-directory: ./crates/prql-compiler/tests/integration
Expand All @@ -97,9 +85,10 @@ jobs:
uses: richb-hanover/[email protected]
with:
command: insta
# See Compile step for explanation of args
# Here, we also add:
# - Unreferenced snapshots - `--unreferenced=auto` when testing on
# linux & with `test-dbs` feature.
args: >
test --target=${{ inputs.target }} --features=${{ inputs.target ==
'x86_64-unknown-linux-gnu' && 'test-dbs-external' || inputs.target
!= 'x86_64-pc-windows-msvc' && 'test-dbs' || '' }} ${{ inputs.target
== 'x86_64-unknown-linux-gnu' && '--unreferenced=auto' || '' }}
test --target=${{ inputs.target }} --features=${{ inputs.features }}
${{ contains(inputs.features, 'test-dbs') && inputs.target ==
'x86_64-unknown-linux-gnu' && '--unreferenced=auto' || '' }}

0 comments on commit 9068678

Please sign in to comment.