Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2f8ef89
Add integration test GitHub action
flip1995 Jan 20, 2020
1158c18
Add clippy_dev checks to GitHub Actions
flip1995 Jan 21, 2020
20c3319
Add remark check to GHA
flip1995 Jan 21, 2020
2a7a3aa
Rename .remarkrc.json -> .remarkrc and fix file
flip1995 Jan 21, 2020
757bbf7
Fix markdown Files
flip1995 Jan 21, 2020
d14ee8a
Add Clippy Test (bors) to GHA
flip1995 Jan 21, 2020
1717a6f
Ignore fmt test in GHA CI
flip1995 Jan 21, 2020
ff8336b
Check if changelog exists
flip1995 Jan 21, 2020
f5db351
Get {RUSTUP,MULTIRUST}_{HOME,TOOLCHAIN} from runtime environment
flip1995 Jan 22, 2020
66b5e22
Add Clippy Test to GHA
flip1995 Jan 22, 2020
9281167
Move integration tests in clippy_bors.yml
flip1995 Jan 22, 2020
893e261
Add deployment to GHA
flip1995 Jan 22, 2020
8f45387
Small change to comment in .gitignore
flip1995 Jan 23, 2020
d7620a3
Add GHA badge to README.md
flip1995 Jan 23, 2020
b9580fc
Cancle builds on new commits
flip1995 Jan 23, 2020
e59361f
Limit parallel jobs on try/r+ runs
flip1995 Jan 23, 2020
935b94d
Sort output of export.py script
flip1995 Jan 24, 2020
ea780a6
Extract driver test
flip1995 Jan 26, 2020
dfdea56
Extract deployment
flip1995 Jan 26, 2020
ab43951
Allow non-ascii characters in changelog check
flip1995 Jan 30, 2020
1ceeb13
Build Clippy before running integration tests
flip1995 Jan 31, 2020
095287d
Add two more error causes to integration test
flip1995 Jan 31, 2020
813d319
Use hash of Cargo.lock file in cache name
flip1995 Jan 31, 2020
b8b47ab
Add bors dummy jobs
flip1995 Feb 4, 2020
abb095d
Run bors checks unconditionally
flip1995 Feb 4, 2020
b47dada
Apply review comments
flip1995 Feb 7, 2020
622ece3
Remove deployment from travis
flip1995 Feb 7, 2020
2745346
Install all required remark packages in travis
flip1995 Feb 7, 2020
a0a21a8
Use nightly cargo to install cargo-cache
flip1995 Feb 9, 2020
3fac289
Don't upload target/release in integration_build
flip1995 Feb 12, 2020
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
Prev Previous commit
Next Next commit
Apply review comments
  • Loading branch information
flip1995 committed Feb 12, 2020
commit b47dada167dea3d889abd77b7ff584afdaaf0a86
2 changes: 1 addition & 1 deletion .github/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash
#!/bin/bash

set -ex

Expand Down
2 changes: 1 addition & 1 deletion .github/driver.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash
#!/bin/bash

set -ex

Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,76 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
GHA_CI: 1
NO_FMT_TEST: 1

jobs:
base:
runs-on: ubuntu-latest

steps:
# Setup
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/[email protected]

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu

- name: Master Toolchain Setup
run: bash setup-toolchain.sh

# Run
- name: Set LD_LIBRARY_PATH (Linux)
run: |
SYSROOT=$(rustc --print sysroot)
echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"

- name: Build
run: cargo build --features deny-warnings

- name: Test
run: cargo test --features deny-warnings

- name: Test clippy_lints
run: cargo test --features deny-warnings
working-directory: clippy_lints

- name: Test rustc_tools_util
run: cargo test --features deny-warnings
working-directory: rustc_tools_util

- name: Test clippy_dev
run: cargo test --features deny-warnings
working-directory: clippy_dev

- name: Test cargo-clippy
run: ../target/debug/cargo-clippy
working-directory: clippy_workspace_tests

- name: Test clippy-driver
run: bash .github/driver.sh
env:
OS: ${{ runner.os }}

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo install cargo-cache --debug
Expand Down
42 changes: 41 additions & 1 deletion .github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
GHA_CI: 1
NO_FMT_TEST: 1

jobs:
changelog:
Expand All @@ -21,6 +21,8 @@ jobs:
uses: actions/[email protected]
with:
ref: ${{ github.ref }}

# Run
- name: Check Changelog
run: |
MESSAGE=$(git log --format=%B -n 1)
Expand Down Expand Up @@ -64,38 +66,46 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
# Setup
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: Install dependencies (Linux-i686)
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
if: matrix.host == 'i686-unknown-linux-gnu'

- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: ${{ matrix.host }}
profile: minimal

- name: Checkout
uses: actions/[email protected]

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.host }}

- name: Master Toolchain Setup
run: bash setup-toolchain.sh
env:
HOST_TOOLCHAIN: ${{ matrix.host }}
shell: bash

# Run
- name: Set LD_LIBRARY_PATH (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -113,34 +123,42 @@ jobs:
$sysroot = rustc --print sysroot
$env:PATH += ';' + $sysroot + '\bin'
echo "::set-env name=PATH::$env:PATH"

- name: Build
run: cargo build --features deny-warnings
shell: bash

- name: Test
run: cargo test --features deny-warnings
shell: bash

- name: Test clippy_lints
run: cargo test --features deny-warnings
shell: bash
working-directory: clippy_lints

- name: Test rustc_tools_util
run: cargo test --features deny-warnings
shell: bash
working-directory: rustc_tools_util

- name: Test clippy_dev
run: cargo test --features deny-warnings
shell: bash
working-directory: clippy_dev

- name: Test cargo-clippy
run: ../target/debug/cargo-clippy
shell: bash
working-directory: clippy_workspace_tests

- name: Test clippy-driver
run: bash .github/driver.sh
shell: bash
env:
OS: ${{ runner.os }}

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo install cargo-cache --debug
Expand All @@ -152,42 +170,53 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/[email protected]

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu

- name: Master Toolchain Setup
run: bash setup-toolchain.sh

# Run
- name: Build Integration Test
run: cargo test --test integration --features integration --no-run

# Upload
- name: Extract Binaries
run: |
DIR=$CARGO_TARGET_DIR/debug
find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
mv $DIR/integration-* $DIR/integration

- name: Upload Binaries
uses: actions/upload-artifact@v1
with:
name: target
path: target

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo install cargo-cache --debug
Expand Down Expand Up @@ -219,42 +248,53 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/[email protected]

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu

- name: Master Toolchain Setup
run: bash setup-toolchain.sh

# Download
- name: Download target dir
uses: actions/download-artifact@v1
with:
name: target
path: target

- name: Make Binaries Executable
run: chmod +x $CARGO_TARGET_DIR/debug/*

# Run
- name: Test ${{ matrix.integration }}
run: $CARGO_TARGET_DIR/debug/integration
env:
INTEGRATION: ${{ matrix.integration }}
RUSTUP_TOOLCHAIN: master

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo install cargo-cache --debug
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,29 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
components: rustfmt

- name: Checkout
uses: actions/[email protected]

# Run
- name: Build
run: cargo build --features deny-warnings
working-directory: clippy_dev

- name: Test limit-stderr-length
run: cargo dev --limit-stderr-length

- name: Test update_lints
run: cargo dev update_lints --check

- name: Test fmt
run: cargo dev fmt --check

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/[email protected]

- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ env.TARGET_BRANCH }}
path: 'out'

# Run
- name: Deploy
run: |
eval "$(ssh-agent -s)"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ jobs:
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/[email protected]

- name: Setup Node.js
uses: actions/[email protected]

- name: Install remark
run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended

# Run
- name: Check *.md files
run: git ls-files -z '*.md' | xargs -0 -n 1 -I {} ./node_modules/.bin/remark {} -u lint -f > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion tests/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::process::Command;

#[test]
fn fmt() {
if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("GHA_CI").is_some() {
if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("NO_FMT_TEST").is_some() {
return;
}

Expand Down