Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add dependabot.yml and replace unmaintained actions-rs actions #66

Merged
merged 5 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/py"
schedule:
interval: "daily"
14 changes: 5 additions & 9 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ name: C
on:
pull_request:
push:
branches: [ main ]
branches: [main]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Configure
run: mkdir -p build && cd build && cmake ../c -DSUBSTRAIT_VALIDATOR_BUILD_TESTS=ON
- name: Build
Expand All @@ -29,8 +25,8 @@ jobs:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jidicula/[email protected]
with:
clang-format-version: '13'
clang-format-version: "13"
check-path: c
34 changes: 17 additions & 17 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ jobs:
name: Check license headers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: enarx/spdx@master
with:
licenses: Apache-2.0 MIT
- uses: actions/checkout@v3
- name: Check License Header
uses: enarx/spdx@master
with:
licenses: Apache-2.0 MIT

editorconfig:
name: Check editorconfig
runs-on: ubuntu-latest
steps:
- uses: editorconfig-checker/action-editorconfig-checker@v1
- uses: editorconfig-checker/action-editorconfig-checker@v1

check-version-patch:
name: Check version update patch file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check version update patch file
run: python3 ci/version.py check
- uses: actions/checkout@v3
- name: Check version update patch file
run: python3 ci/version.py check

verify-antlr:
name: Verify ANTLR-generated code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check
working-directory: rs/antlr
run: python3 generate.py --ci
Expand All @@ -41,10 +41,10 @@ jobs:
name: Lint commits for semantic-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: npx commitlint --from=${{ github.event.pull_request.base.sha }} --to=${{ github.sha }} --verbose
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "14"
- run: npx commitlint --from=${{ github.event.pull_request.base.sha }} --to=${{ github.sha }} --verbose
14 changes: 8 additions & 6 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@ name: Protobuf
on:
pull_request:
push:
branches: [ main ]
branches: [main]

jobs:
style:
name: Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: bufbuild/buf-setup-action@v1.4.0
- uses: bufbuild/buf-setup-action@v1.9.0
- run: buf format --diff --exit-code

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: arduino/setup-protoc@v1
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-lint-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: bufbuild/[email protected]
- uses: bufbuild/[email protected]
- name: Compile protobuf
run: buf generate
174 changes: 85 additions & 89 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Python
on:
pull_request:
push:
branches: [ main ]
tags: [ 'v*.*.*' ]
branches: [main]
tags: ["v*.*.*"]

jobs:
build:
Expand All @@ -16,93 +16,89 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
type: [wheel]
include:
- os: ubuntu-latest
python-version: "3.7"
type: sdist
- os: ubuntu-latest
python-version: "3.7"
type: sdist
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Fetch Substrait submodule tags
working-directory: substrait
run: |
git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
git describe --dirty --tags
- name: Install latest protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install sdist-only dependencies
if: ${{ matrix.type == 'sdist' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: sdist-only build prep
if: ${{ matrix.type == 'sdist' }}
working-directory: rs
run: cargo check
# ^ this ensures that its build.rs is run, which is all we need. Sadly
# there doesn't seem to be a way to do this that doesn't pull in all
# normal dependencies: https://github.com/rust-lang/cargo/issues/7178
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python build dependencies
run: python3 -m pip install --upgrade pip "maturin>=0.14,<0.15"
- name: Prepare build environment
working-directory: py
run: python3 prepare_build.py populate
- name: Create sdist
if: ${{ matrix.type == 'sdist' }}
uses: PyO3/[email protected]
with:
command: sdist
args: -o dist -m py/Cargo.toml
- name: Build manylinux wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'ubuntu-latest' }}
uses: PyO3/[email protected]
with:
manylinux: auto
command: build
args: -i ${{ matrix.python-version }} --release -o dist -m py/Cargo.toml
- name: Build Windows wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'windows-latest' }}
uses: PyO3/[email protected]
with:
command: build
args: --release -o dist -m py/Cargo.toml
- name: Build MacOS wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'macos-latest' }}
uses: PyO3/[email protected]
with:
command: build
args: --release -o dist --universal2 -m py/Cargo.toml
- name: Install runtime dependencies
run: python3 -m pip install --upgrade protobuf pytest click pyyaml jdot toml
- name: Install generated sdist
if: ${{ matrix.type == 'sdist' }}
run: python3 -m pip install dist/substrait_validator-*.tar.gz
- name: Install generated wheel
if: ${{ matrix.type == 'wheel' }}
run: python3 -m pip install --no-index --find-links=dist substrait-validator
- name: Test
working-directory: py/tests
run: python3 -m pytest
- name: Upload wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Fetch Substrait submodule tags
working-directory: substrait
run: |
git fetch --recurse-submodules=no origin +refs/tags/*:refs/tags/*
git describe --dirty --tags
- name: Install latest protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install sdist-only dependencies
if: ${{ matrix.type == 'sdist' }}
uses: dtolnay/rust-toolchain@stable
- name: sdist-only build prep
if: ${{ matrix.type == 'sdist' }}
working-directory: rs
run: cargo check
# ^ this ensures that its build.rs is run, which is all we need. Sadly
# there doesn't seem to be a way to do this that doesn't pull in all
# normal dependencies: https://github.com/rust-lang/cargo/issues/7178
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python build dependencies
run: python3 -m pip install --upgrade pip "maturin>=0.14,<0.15"
- name: Prepare build environment
working-directory: py
run: python3 prepare_build.py populate
- name: Create sdist
if: ${{ matrix.type == 'sdist' }}
uses: PyO3/[email protected]
with:
command: sdist
args: -o dist -m py/Cargo.toml
- name: Build manylinux wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'ubuntu-latest' }}
uses: PyO3/[email protected]
with:
manylinux: auto
command: build
args: -i ${{ matrix.python-version }} --release -o dist -m py/Cargo.toml
- name: Build Windows wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'windows-latest' }}
uses: PyO3/[email protected]
with:
command: build
args: --release -o dist -m py/Cargo.toml
- name: Build MacOS wheels
if: ${{ matrix.type == 'wheel' && matrix.os == 'macos-latest' }}
uses: PyO3/[email protected]
with:
command: build
args: --release -o dist --universal2 -m py/Cargo.toml
- name: Install runtime dependencies
run: python3 -m pip install --upgrade protobuf pytest click pyyaml jdot toml
- name: Install generated sdist
if: ${{ matrix.type == 'sdist' }}
run: python3 -m pip install dist/substrait_validator-*.tar.gz
- name: Install generated wheel
if: ${{ matrix.type == 'wheel' }}
run: python3 -m pip install --no-index --find-links=dist substrait-validator
- name: Test
working-directory: py/tests
run: python3 -m pytest
- name: Upload wheels
if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ build ]
needs: [build]
environment: VALIDATOR_RELEASE
steps:
- uses: actions/download-artifact@v2
Expand All @@ -126,10 +122,10 @@ jobs:
name: Style & lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
run: python3 -m flake8 .
- uses: actions/checkout@v3
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
run: python3 -m flake8 .
Loading