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

ci: include config_proc_macro crate in ci #5389

Merged
merged 5 commits into from
Jun 21, 2022
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: 2 additions & 12 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,5 @@ jobs:
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.target }}

- name: build
run: |
rustc -Vv
cargo -V
cargo build
env:
RUSTFLAGS: '-D warnings'

- name: test
run: cargo test
env:
RUSTFLAGS: '-D warnings'
- name: Build and Test
run: ./ci/build_and_test.sh
10 changes: 2 additions & 8 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,5 @@ jobs:
sh rustup-init.sh -y --default-toolchain none
rustup target add ${{ matrix.target }}

- name: build
run: |
rustc -Vv
cargo -V
cargo build

- name: test
run: cargo test
- name: Build and Test
run: ./ci/build_and_test.sh
11 changes: 2 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ jobs:
if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
shell: bash

- name: build
run: |
rustc -Vv
cargo -V
cargo build
shell: cmd

- name: test
run: cargo test
- name: Build and Test
shell: cmd
run: ci\build_and_test.bat
14 changes: 14 additions & 0 deletions ci/build_and_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set "RUSTFLAGS=-D warnings"

:: Print version information
rustc -Vv || exit /b 1
cargo -V || exit /b 1

:: Build and test main crate
cargo build --locked || exit /b 1
cargo test || exit /b 1

:: Build and test other crates
cd config_proc_macro || exit /b 1
cargo build --locked || exit /b 1
cargo test || exit /b 1
18 changes: 18 additions & 0 deletions ci/build_and_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -euo pipefail

export RUSTFLAGS="-D warnings"

# Print version information
rustc -Vv
cargo -V

# Build and test main crate
cargo build --locked
cargo test

# Build and test other crates
cd config_proc_macro
cargo build --locked
cargo test
44 changes: 22 additions & 22 deletions config_proc_macro/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions config_proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub fn config_type(_args: TokenStream, input: TokenStream) -> TokenStream {
/// Used to conditionally output the TokenStream for tests that need to be run on nightly only.
///
/// ```rust
/// # use rustfmt_config_proc_macro::nightly_only_test;
///
/// #[nightly_only_test]
/// #[test]
/// fn test_needs_nightly_rustfmt() {
Expand All @@ -49,6 +51,8 @@ pub fn nightly_only_test(_args: TokenStream, input: TokenStream) -> TokenStream
/// Used to conditionally output the TokenStream for tests that need to be run on stable only.
///
/// ```rust
/// # use rustfmt_config_proc_macro::stable_only_test;
///
/// #[stable_only_test]
/// #[test]
/// fn test_needs_stable_rustfmt() {
Expand Down