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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/musicalninjas/pyo3-devcontainer:latest@sha256:adbb63a1847e6e0d38a815eac48bf57b8bf2b12996263cdf4daf3ebeeb38e08d
FROM ghcr.io/musicalninjadad/rust-devcontainer:latest@sha256:243aac918fd1a9bf696b74543d839dc52bcb3e95d9eb550b1641af401a470488
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"build": {
"dockerfile": "Dockerfile"
},
// required so that command line & analyzer can share builds
"remoteEnv": {
"RUSTC_BOOTSTRAP": "1"
"RUSTC_BOOTSTRAP": "1",
"CARGO_INCREMENTAL": "1"
},
"updateContentCommand": "rustup install",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -21,8 +24,6 @@
// rust
"rust-analyzer.interpret.tests": true,
"rust-analyzer.testExplorer": true,
// use subdirectory of target for analyzer builds
"rust-analyzer.cargo.targetDir": true,
// force BOOTSTRAP (always used for test builds - see https://github.com/rust-lang/rust-analyzer/issues/17149)
"rust-analyzer.cargo.extraEnv": {
"RUSTC_BOOTSTRAP": "1",
Expand Down
7 changes: 6 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
directories:
- "/"
schedule:
interval: "daily"
cooldown:
default-days: 10
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
Expand All @@ -16,3 +19,5 @@ updates:
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 10
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Dependabot automation
on: pull_request
on:
pull_request:
paths-ignore:
# Do not auto-approve changes to publishing workflow!
- ".github/workflows/rust-publish.yml"

permissions:
contents: write
Expand All @@ -8,6 +12,7 @@ permissions:
jobs:
merge:
runs-on: ubuntu-latest
# Manually set the repo name so this doesn't run on forks
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'MusicalNinjaDad/try_v2'
steps:
- name: Ensure this is a valid dependabot PR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe #v1.0.4
id: auth
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
run:
cargo +nightly publish
cargo publish
27 changes: 16 additions & 11 deletions .github/workflows/rust-stability.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
name: Monthly stability checks

on:
workflow_dispatch:
workflow_call:
pull_request:
push:
paths:
- ".github/workflows/rust-stability.yml"
schedule:
- cron: '0 3 6 * *'

permissions:
contents: read
issues: write
workflow_dispatch:
workflow_call:

env:
CARGO_TERM_COLOR: always
RUSTC_BOOTSTRAP: 1

jobs:

Expand All @@ -26,9 +24,11 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: update rust
run: rustup set profile default && rustup update && rustup default ${{ matrix.channel }}
run: rustup set profile default && rustup install ${{ matrix.channel }}
- name: Set bootstrap
run: test "${{ matrix.channel }}" != "nightly" && echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV || true
- name: Run tests
run: cargo test --no-fail-fast
run: cargo "+${{ matrix.channel }}" test --no-fail-fast

lint:
strategy:
Expand All @@ -39,14 +39,19 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: update rust
run: rustup set profile default && rustup update && rustup default ${{ matrix.channel }}
run: rustup set profile default && rustup install ${{ matrix.channel }}
- name: Set bootstrap
run: test "${{ matrix.channel }}" != "nightly" && echo "RUSTC_BOOTSTRAP=1" >> $GITHUB_ENV || true
- name: clippy
run: cargo clippy -- --deny warnings
run: cargo +${{ matrix.channel }} clippy -- --deny warnings

report:
if: ${{ always() }}
needs: [test, lint]
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v6
- name: Create issue on failure
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
paths:
- "**.rs"
- "Cargo.toml"
- "rust-toolchain.toml"
- ".github/workflows/rust.yml"
pull_request:
workflow_call:

env:
CARGO_TERM_COLOR: always
RUSTC_BOOTSTRAP: 1

jobs:

Expand Down Expand Up @@ -64,10 +64,13 @@ jobs:

runs-on: ubuntu-latest

env:
RUSTC_BOOTSTRAP: 1

steps:
- uses: actions/checkout@v6
- name: install cargo-msrv
uses: taiki-e/install-action@v2.79.2
uses: taiki-e/install-action@v2.75.27
with:
tool: cargo-msrv
- name: check MSRV
Expand Down
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "nightly"
profile = "default"
Loading