From a85ee9d18b311ad4ecc4f1705a510db2df0b0682 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Wed, 17 Jul 2024 11:28:35 +0200 Subject: [PATCH] TMP delete other workflows --- .github/workflows/audit.yml | 43 --- .github/workflows/dependencies.yml | 52 --- .github/workflows/dev.yml | 57 --- .github/workflows/dev_pr.yml | 65 ---- .github/workflows/docs.yaml | 64 ---- .github/workflows/docs_pr.yaml | 53 --- .github/workflows/pr_comment.yml | 53 --- .github/workflows/rust.yml | 584 ----------------------------- .github/workflows/stale.yml | 38 -- .github/workflows/take.yml | 41 -- 10 files changed, 1050 deletions(-) delete mode 100644 .github/workflows/audit.yml delete mode 100644 .github/workflows/dependencies.yml delete mode 100644 .github/workflows/dev.yml delete mode 100644 .github/workflows/dev_pr.yml delete mode 100644 .github/workflows/docs.yaml delete mode 100644 .github/workflows/docs_pr.yaml delete mode 100644 .github/workflows/pr_comment.yml delete mode 100644 .github/workflows/rust.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/take.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml deleted file mode 100644 index 0d65b1aa809ff..0000000000000 --- a/.github/workflows/audit.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Security audit - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -on: - push: - paths: - - "**/Cargo.toml" - - "**/Cargo.lock" - - pull_request: - paths: - - "**/Cargo.toml" - - "**/Cargo.lock" - -jobs: - security_audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install cargo-audit - run: cargo install cargo-audit - - name: Run audit check - run: cargo audit diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml deleted file mode 100644 index ebc5bcf91c94b..0000000000000 --- a/.github/workflows/dependencies.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Dependencies - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -on: - push: - paths: - - "**/Cargo.toml" - pull_request: - paths: - - "**/Cargo.toml" - # manual trigger - # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow - workflow_dispatch: - -jobs: - depcheck: - name: circular dependency check - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Check dependencies - run: | - cd dev/depcheck - cargo run \ No newline at end of file diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml deleted file mode 100644 index 19af21ec910be..0000000000000 --- a/.github/workflows/dev.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Dev -on: [push, pull_request] - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - rat: - name: Release Audit Tool (RAT) - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Audit licenses - run: ./dev/release/run-rat.sh . - - prettier: - name: Use prettier to check formatting of documents - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Prettier check - run: | - # if you encounter error, rerun the command below and commit the changes - # - # ignore subproject CHANGELOG.md because they are machine generated - npx prettier@2.7.1 --write \ - '{datafusion,datafusion-cli,datafusion-examples,dev,docs}/**/*.md' \ - '!datafusion/CHANGELOG.md' \ - README.md \ - CONTRIBUTING.md - git diff --exit-code diff --git a/.github/workflows/dev_pr.yml b/.github/workflows/dev_pr.yml deleted file mode 100644 index 11c14c5c2feee..0000000000000 --- a/.github/workflows/dev_pr.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Labeler - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - process: - name: Process - runs-on: ubuntu-latest - # only run for users whose permissions allow them to update PRs - # otherwise labeler is failing: - # https://github.com/apache/datafusion/issues/3743 - permissions: - contents: read - pull-requests: write - steps: - - uses: actions/checkout@v4 - - - name: Assign GitHub labels - if: | - github.event_name == 'pull_request_target' && - (github.event.action == 'opened' || - github.event.action == 'synchronize') - uses: actions/labeler@v5.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/workflows/dev_pr/labeler.yml - sync-labels: true - - # TODO: Enable this when eps1lon/actions-label-merge-conflict is available. - # - name: Checks if PR needs rebase - # if: | - # github.event_name == 'push' || - # (github.event_name == 'pull_request_target' && - # (github.event.action == 'opened' || - # github.event.action == 'synchronize')) - # uses: eps1lon/actions-label-merge-conflict@releases/2.x - # with: - # dirtyLabel: "needs-rebase" - # repoToken: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 44ca5aaf4eda1..0000000000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,64 +0,0 @@ -on: - push: - branches: - - main - paths: - - .asf.yaml - - .github/workflows/docs.yaml - - docs/** - -name: Deploy DataFusion site - -jobs: - build-docs: - name: Build docs - runs-on: ubuntu-latest - steps: - - name: Checkout docs sources - uses: actions/checkout@v4 - - - name: Checkout asf-site branch - uses: actions/checkout@v4 - with: - ref: asf-site - path: asf-site - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - set -x - python3 -m venv venv - source venv/bin/activate - pip install -r docs/requirements.txt - - - name: Build docs - run: | - set -x - source venv/bin/activate - cd docs - ./build.sh - - - name: Copy & push the generated HTML - run: | - set -x - cd asf-site/ - rsync \ - -a \ - --delete \ - --exclude '/.git/' \ - ../docs/build/html/ \ - ./ - cp ../.asf.yaml . - touch .nojekyll - git status --porcelain - if [ "$(git status --porcelain)" != "" ]; then - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add --all - git commit -m 'Publish built docs triggered by ${{ github.sha }}' - git push || git push --force - fi \ No newline at end of file diff --git a/.github/workflows/docs_pr.yaml b/.github/workflows/docs_pr.yaml deleted file mode 100644 index c2f3dd684a23e..0000000000000 --- a/.github/workflows/docs_pr.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Docs - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -on: - push: - paths: - - "docs/**" - pull_request: - paths: - - "docs/**" - # manual trigger - # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow - workflow_dispatch: - -jobs: - # Run doc tests - linux-test-doc: - name: cargo doctest (amd64) - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run doctests - run: cargo test --doc --features avro,json - - name: Verify Working Directory Clean - run: git diff --exit-code diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml deleted file mode 100644 index 8b6df1c75687d..0000000000000 --- a/.github/workflows/pr_comment.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Downloads any `message` artifacts created by other jobs -# and posts them as comments to the PR -name: PR Comment - -on: - workflow_run: - workflows: ["Benchmarks"] - types: - - completed - -jobs: - comment: - name: PR Comment - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - - name: Download comment message - uses: actions/download-artifact@v4 - with: - name: message - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Download pr number - uses: actions/download-artifact@v4 - with: - name: pr - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Print message and pr number - run: | - cat pr - echo "PR_NUMBER=$(cat pr)" >> "$GITHUB_ENV" - cat message.md - - - name: Post the comment - uses: actions/github-script@v7 - with: - script: | - const fs = require('fs'); - const content = fs.readFileSync('message.md', 'utf8'); - github.rest.issues.createComment({ - issue_number: process.env.PR_NUMBER, - owner: context.repo.owner, - repo: context.repo.repo, - body: content, - }) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 2ddeebbc558e5..0000000000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,584 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Rust - -concurrency: - group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} - cancel-in-progress: true - -on: - push: - paths-ignore: - - "docs/**" - - "**.md" - - ".github/ISSUE_TEMPLATE/**" - - ".github/pull_request_template.md" - pull_request: - paths-ignore: - - "docs/**" - - "**.md" - - ".github/ISSUE_TEMPLATE/**" - - ".github/pull_request_template.md" - # manual trigger - # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow - workflow_dispatch: - -jobs: - # Check crate compiles - linux-build-lib: - name: cargo check - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - - name: Cache Cargo - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ./target/ - ./datafusion-cli/target/ - # this key equals the ones on `linux-build-lib` for re-use - key: cargo-cache-benchmark-${{ hashFiles('datafusion/**/Cargo.toml', 'benchmarks/Cargo.toml', 'datafusion-cli/Cargo.toml') }} - - - name: Check datafusion without default features - # Some of the test binaries require the parquet feature still - #run: cargo check --all-targets --no-default-features -p datafusion - run: cargo check --no-default-features -p datafusion - - - name: Check datafusion-common without default features - run: cargo check --all-targets --no-default-features -p datafusion-common - - - name: Check datafusion-functions - run: cargo check --all-targets --no-default-features -p datafusion-functions - - - name: Check workspace in debug mode - run: cargo check --all-targets --workspace - - - name: Check workspace with avro,json features - run: cargo check --workspace --benches --features avro,json - - - name: Check Cargo.lock for datafusion-cli - run: | - # If this test fails, try running `cargo update` in the `datafusion-cli` directory - # and check in the updated Cargo.lock file. - cargo check --manifest-path datafusion-cli/Cargo.toml --locked - - # Ensure that the datafusion crate can be built with only a subset of the function - # packages enabled. - - name: Check datafusion (array_expressions) - run: cargo check --no-default-features --features=array_expressions -p datafusion - - - name: Check datafusion (crypto) - run: cargo check --no-default-features --features=crypto_expressions -p datafusion - - - name: Check datafusion (datetime_expressions) - run: cargo check --no-default-features --features=datetime_expressions -p datafusion - - - name: Check datafusion (encoding_expressions) - run: cargo check --no-default-features --features=encoding_expressions -p datafusion - - - name: Check datafusion (math_expressions) - run: cargo check --no-default-features --features=math_expressions -p datafusion - - - name: Check datafusion (regex_expressions) - run: cargo check --no-default-features --features=regex_expressions -p datafusion - - - name: Check datafusion (string_expressions) - run: cargo check --no-default-features --features=string_expressions -p datafusion - - # Ensure that the datafusion-functions crate can be built with only a subset of the function - # packages enabled. - - name: Check datafusion-functions (crypto) - run: cargo check --all-targets --no-default-features --features=crypto_expressions -p datafusion-functions - - - name: Check datafusion-functions (datetime_expressions) - run: cargo check --all-targets --no-default-features --features=datetime_expressions -p datafusion-functions - - - name: Check datafusion-functions (encoding_expressions) - run: cargo check --all-targets --no-default-features --features=encoding_expressions -p datafusion-functions - - - name: Check datafusion-functions (math_expressions) - run: cargo check --all-targets --no-default-features --features=math_expressions -p datafusion-functions - - - name: Check datafusion-functions (regex_expressions) - run: cargo check --all-targets --no-default-features --features=regex_expressions -p datafusion-functions - - - name: Check datafusion-functions (string_expressions) - run: cargo check --all-targets --no-default-features --features=string_expressions -p datafusion-functions - - # Run tests - linux-test: - name: cargo test (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run tests (excluding doctests) - run: cargo test --lib --tests --bins --features avro,json,backtrace - - name: Verify Working Directory Clean - run: git diff --exit-code - - linux-test-datafusion-cli: - name: cargo test datafusion-cli (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run tests (excluding doctests) - run: | - cd datafusion-cli - cargo test --lib --tests --bins --all-features - - name: Verify Working Directory Clean - run: git diff --exit-code - - linux-test-example: - name: cargo examples (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run examples - run: | - # test datafusion-sql examples - cargo run --example sql - # test datafusion-examples - ci/scripts/rust_example.sh - - name: Verify Working Directory Clean - run: git diff --exit-code - - - - # Run `cargo test doc` (test documentation examples) - linux-test-doc: - name: cargo test doc (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run doctests - run: | - cargo test --doc --features avro,json - cd datafusion-cli - cargo test --doc --all-features - - name: Verify Working Directory Clean - run: git diff --exit-code - - # Run `cargo doc` to ensure the rustdoc is clean - linux-rustdoc: - name: cargo doc - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run cargo doc - run: | - export RUSTDOCFLAGS="-D warnings -A rustdoc::private-intra-doc-links" - cargo doc --document-private-items --no-deps --workspace - cd datafusion-cli - cargo doc --document-private-items --no-deps - - linux-wasm-pack: - name: build with wasm-pack - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Install wasm-pack - run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - name: Build with wasm-pack - working-directory: ./datafusion/wasmtest - run: wasm-pack build --dev - - # verify that the benchmark queries return the correct results - verify-benchmark-results: - name: verify benchmark results (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Generate benchmark data and expected query results - run: | - mkdir -p datafusion/sqllogictest/test_files/tpch/data - git clone https://github.com/databricks/tpch-dbgen.git - cd tpch-dbgen - make - ./dbgen -f -s 0.1 - mv *.tbl ../datafusion/sqllogictest/test_files/tpch/data - - name: Verify that benchmark queries return expected results - run: | - export TPCH_DATA=`realpath datafusion/sqllogictest/test_files/tpch/data` - # use release build for plan verificaton because debug build causes stack overflow - cargo test plan_q --package datafusion-benchmarks --profile release-nonlto --features=ci -- --test-threads=1 - INCLUDE_TPCH=true cargo test --test sqllogictests - - name: Verify Working Directory Clean - run: git diff --exit-code - - sqllogictest-postgres: - name: "Run sqllogictest with Postgres runner" - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - services: - postgres: - image: postgres:15 - env: - POSTGRES_PASSWORD: postgres - POSTGRES_DB: db_test - POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=C --lc-ctype=C - ports: - - 5432/tcp - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup toolchain - run: | - rustup toolchain install stable - rustup default stable - - name: Run sqllogictest - run: PG_COMPAT=true PG_URI="postgresql://postgres:postgres@localhost:$POSTGRES_PORT/db_test" cargo test --features=postgres --test sqllogictests - env: - POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} - - windows: - name: cargo test (win64) - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-windows-builder - - name: Run tests (excluding doctests) - shell: bash - run: | - export PATH=$PATH:$HOME/d/protoc/bin - cargo test --lib --tests --bins --features avro,json,backtrace - cd datafusion-cli - cargo test --lib --tests --bins --all-features - - macos: - name: cargo test (macos) - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-macos-builder - - name: Run tests (excluding doctests) - shell: bash - run: | - cargo test --lib --tests --bins --features avro,json,backtrace - cd datafusion-cli - cargo test --lib --tests --bins --all-features - - macos-aarch64: - name: cargo test (macos-aarch64) - runs-on: macos-14 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-macos-aarch64-builder - - name: Run tests (excluding doctests) - shell: bash - run: | - cargo test --lib --tests --bins --features avro,json,backtrace - cd datafusion-cli - cargo test --lib --tests --bins --all-features - - test-datafusion-pyarrow: - name: cargo test pyarrow (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-20.04 - container: - image: amd64/rust:bullseye # Workaround https://github.com/actions/setup-python/issues/721 - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/setup-python@v5 - with: - python-version: "3.8" - - name: Install PyArrow - run: | - echo "LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV - python -m pip install pyarrow - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run datafusion-common tests - run: cargo test -p datafusion-common --features=pyarrow - - vendor: - name: Verify Vendored Code - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - - name: Run gen - run: ./regen.sh - working-directory: ./datafusion/proto - - name: Verify workspace clean (if this fails, run ./datafusion/proto/regen.sh and check in results) - run: git diff --exit-code - - check-fmt: - name: Check cargo fmt - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run - run: | - echo '' > datafusion/proto/src/generated/datafusion.rs - ci/scripts/rust_fmt.sh - - # Coverage job disabled due to - # https://github.com/apache/datafusion/issues/3678 - - # coverage: - # name: coverage - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # submodules: true - # - name: Install protobuf compiler - # shell: bash - # run: | - # mkdir -p $HOME/d/protoc - # cd $HOME/d/protoc - # export PROTO_ZIP="protoc-21.4-linux-x86_64.zip" - # curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP - # unzip $PROTO_ZIP - # export PATH=$PATH:$HOME/d/protoc/bin - # protoc --version - # - name: Setup Rust toolchain - # run: | - # rustup toolchain install stable - # rustup default stable - # rustup component add rustfmt clippy - # - name: Cache Cargo - # uses: actions/cache@v4 - # with: - # path: /home/runner/.cargo - # # this key is not equal because the user is different than on a container (runner vs github) - # key: cargo-coverage-cache3- - # - name: Run coverage - # run: | - # export PATH=$PATH:$HOME/d/protoc/bin - # rustup toolchain install stable - # rustup default stable - # cargo install --version 0.20.1 cargo-tarpaulin - # cargo tarpaulin --all --out Xml - # - name: Report coverage - # continue-on-error: true - # run: bash <(curl -s https://codecov.io/bash) - - clippy: - name: clippy - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Install Clippy - run: rustup component add clippy - - name: Run clippy - run: ci/scripts/rust_clippy.sh - - # Check answers are correct when hash values collide - hash-collisions: - name: cargo test hash collisions (amd64) - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Run tests - run: | - cd datafusion - cargo test --lib --tests --features=force_hash_collisions,avro - - cargo-toml-formatting-checks: - name: check Cargo.toml formatting - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - name: Install taplo - run: cargo +stable install taplo-cli --version ^0.9 --locked - # if you encounter an error, try running 'taplo format' to fix the formatting automatically. - - name: Check Cargo.toml formatting - run: taplo format --check - - config-docs-check: - name: check configs.md is up-to-date - needs: [ linux-build-lib ] - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Check if configs.md has been modified - run: | - # If you encounter an error, run './dev/update_config_docs.sh' and commit - ./dev/update_config_docs.sh - git diff --exit-code - - # Verify MSRV for the crates which are directly used by other projects: - # - datafusion - # - datafusion-substrait - # - datafusion-proto - # - datafusion-cli - msrv: - name: Verify MSRV (Min Supported Rust Version) - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@v4 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - - name: Install cargo-msrv - run: cargo install cargo-msrv - - name: Check datafusion - working-directory: datafusion/core - run: | - # If you encounter an error with any of the commands below - # it means some crate in your dependency tree has a higher - # MSRV (Min Supported Rust Version) than the one specified - # in the `rust-version` key of `Cargo.toml`. Check your - # dependencies or update the version in `Cargo.toml` - cargo msrv verify - - name: Check datafusion-substrait - working-directory: datafusion/substrait - run: cargo msrv verify - - name: Check datafusion-proto - working-directory: datafusion/proto - run: cargo msrv verify - - name: Check datafusion-cli - working-directory: datafusion-cli - run: cargo msrv verify \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 2312526824a91..0000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: "Close stale PRs" -on: - schedule: - - cron: "30 1 * * *" - -jobs: - close-stale-prs: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v9 - with: - stale-pr-message: "Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days." - days-before-pr-stale: 60 - days-before-pr-close: 7 - # do not close stale issues - days-before-issue-stale: -1 - days-before-issue-close: -1 - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/take.yml b/.github/workflows/take.yml deleted file mode 100644 index 86dc190add1d1..0000000000000 --- a/.github/workflows/take.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -name: Assign the issue via a `take` comment -on: - issue_comment: - types: created - -permissions: - issues: write - -jobs: - issue_assign: - runs-on: ubuntu-latest - if: (!github.event.issue.pull_request) && github.event.comment.body == 'take' - concurrency: - group: ${{ github.actor }}-issue-assign - steps: - - run: | - CODE=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -LI https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees/${{ github.event.comment.user.login }} -o /dev/null -w '%{http_code}\n' -s) - if [ "$CODE" -eq "204" ] - then - echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}" - curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees - else - echo "Cannot assign issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}" - fi \ No newline at end of file