mirror of
https://github.com/oxalica/nil.git
synced 2024-11-22 02:55:39 +03:00
Tweak CI and fix MSRV test
This commit is contained in:
parent
fc91c3f6d6
commit
612bbe972a
@ -9,7 +9,7 @@ trim_trailing_whitespace = true
|
|||||||
[*.md]
|
[*.md]
|
||||||
indent_size = 1
|
indent_size = 1
|
||||||
|
|
||||||
[*.{ast,nix,sh,vim}]
|
[*.{ast,nix,sh,vim,yaml}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[*.patch]
|
[*.patch]
|
||||||
|
@ -3,6 +3,9 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
@ -15,6 +18,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v17
|
uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Prepare devShell
|
- name: Prepare devShell
|
||||||
run: nix develop --command true
|
run: nix develop --command true
|
||||||
- name: Install NPM packages
|
- name: Install NPM packages
|
||||||
@ -25,12 +30,14 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
channel: [stable, beta]
|
channel: [stable, beta]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
channel: "1.62.0"
|
# Should be sync with Cargo.toml
|
||||||
|
channel: '1.66'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -38,10 +45,11 @@ jobs:
|
|||||||
# For builtins.
|
# For builtins.
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v17
|
uses: cachix/install-nix-action@v17
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
toolchain: ${{ matrix.channel }}
|
toolchain: ${{ matrix.channel }}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --all
|
run: cargo build --all
|
||||||
@ -49,9 +57,11 @@ jobs:
|
|||||||
run: cargo test --all -- --include-ignored
|
run: cargo test --all -- --include-ignored
|
||||||
|
|
||||||
nix-flake:
|
nix-flake:
|
||||||
name: Nix package (flake)
|
name: Flake package
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
deps: [latest, locked]
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
@ -59,14 +69,24 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v17
|
uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Flake update
|
||||||
|
if: matrix.deps == 'latest'
|
||||||
|
# https://github.com/actions/checkout/tree/v3.3.0#push-a-commit-using-the-built-in-token
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions
|
||||||
|
git config user.email github-actions@github.com
|
||||||
|
nix flake update --commit-lock-file
|
||||||
- name: Flake check
|
- name: Flake check
|
||||||
run: nix flake check --no-update-lock-file --show-trace --verbose
|
run: nix flake check --no-update-lock-file --show-trace
|
||||||
- name: Flake build
|
- name: Flake build
|
||||||
run: nix build --no-update-lock-file --show-trace --verbose --print-build-logs
|
run: nix build --no-update-lock-file --show-trace --print-build-logs
|
||||||
|
|
||||||
nix-legacy:
|
nix-legacy:
|
||||||
name: Nix package (legacy)
|
name: Legacy package
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@ -80,5 +100,6 @@ jobs:
|
|||||||
uses: cachix/install-nix-action@v17
|
uses: cachix/install-nix-action@v17
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Nix build
|
- name: Nix build
|
||||||
run: nix-build --show-trace --verbose
|
run: nix-build --show-trace
|
@ -12,6 +12,7 @@ members = [
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
# Should be sync with CI.
|
||||||
rust-version = "1.66"
|
rust-version = "1.66"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
Loading…
Reference in New Issue
Block a user