Skip to content
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: github-actions
cooldown:
default-days: 7
directory: /
schedule:
interval: weekly
time: "06:00"
timezone: "Etc/UTC"
commit-message:
prefix: ci
include: scope
118 changes: 74 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ jobs:
rust: stable-x86_64-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: ${{ matrix.rust }}
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: ${{ matrix.rust }}
- name: Show CPU info for debugging
if: matrix.os == 'ubuntu-latest'
run: lscpu
Expand Down Expand Up @@ -107,7 +109,9 @@ jobs:
- s390x-unknown-linux-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install and configure Cross
run: |
# In the past, new releases of 'cross' have broken CI. So for now, we
Expand All @@ -120,15 +124,25 @@ jobs:
curl -LO "https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz"
tar xf cross-x86_64-unknown-linux-musl.tar.gz
- name: Basic build
run: cross build --all --verbose --target ${{ matrix.target }}
run: cross build --all --verbose --target ${TARGET}
env:
TARGET: ${{ matrix.target }}
- name: Run subset of tests
run: cross test --verbose --test integration --target ${{ matrix.target }}
run: cross test --verbose --test integration --target ${TARGET}
env:
TARGET: ${{ matrix.target }}
- name: Run subset of regex-syntax tests
run: cross test --verbose -p regex-syntax --lib --target ${{ matrix.target }}
run: cross test --verbose -p regex-syntax --lib --target ${TARGET}
env:
TARGET: ${{ matrix.target }}
- name: Run subset of regex-automata tests
run: cross test --verbose -p regex-automata --lib --target ${{ matrix.target }}
run: cross test --verbose -p regex-automata --lib --target ${TARGET}
env:
TARGET: ${{ matrix.target }}
- name: Run regex-lite tests
run: cross test --verbose -p regex-lite --lib --target ${{ matrix.target }}
run: cross test --verbose -p regex-lite --lib --target ${TARGET}
env:
TARGET: ${{ matrix.target }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to the template-injection audit of zizmor. Template expansion can be abused or misused in some cases. That obviously isn't the case here, but because crabwatch uses the pedantic persona, zizmor flags all template expansion in code contexts, which it considers code smells.

It can be made less repetitive if we move the definition of the TARGET environment variable to the job level, if that's bothering you.


# This job runs a stripped down version of CI to test the MSRV. The specific
# reason for doing this is that the regex crate's dev-dependencies tend to
Expand All @@ -142,11 +156,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: 1.65.0
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: 1.65.0
- name: Basic build
run: cargo build --verbose
- name: Build docs
Expand All @@ -162,11 +178,13 @@ jobs:
RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links --cfg docsrs_regex"
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: nightly
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: nightly
- name: Build docs
run: cargo doc --verbose --workspace --all-features

Expand All @@ -181,11 +199,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: stable
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: stable
- name: Run full test suite
run: ./test

Expand All @@ -194,11 +214,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: stable
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: stable
- name: Run full test suite
run: ./regex-automata/test

Expand All @@ -207,11 +229,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: stable
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: stable
- name: Run full test suite
run: ./regex-syntax/test

Expand All @@ -220,11 +244,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: stable
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: stable
- name: Run full test suite
run: ./regex-capi/test

Expand All @@ -235,15 +261,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} -c ${COMPONENTS} && rustup default ${TOOLCHAIN}
env:
# We use nightly here so that we can use miri I guess?
# It caught me by surprise that miri seems to only be
# available on nightly.
toolchain: nightly
components: miri
TOOLCHAIN: nightly
COMPONENTS: miri
- name: Run full test suite
run: cargo miri test -p regex-automata

Expand All @@ -252,12 +280,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
toolchain: stable
components: rustfmt
persist-credentials: false
- name: Install Rust
run: rustup install ${TOOLCHAIN} -c ${COMPONENTS} && rustup default ${TOOLCHAIN}
env:
TOOLCHAIN: stable
COMPONENTS: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
Loading