From 3d8c5b967500bd5121fc0e4f3ffe596b32a0a31f Mon Sep 17 00:00:00 2001 From: Shingo Kato Date: Fri, 18 Sep 2020 16:19:12 +0000 Subject: [PATCH 1/4] build: add rust-toolchain file --- rust-toolchain | 1 + 1 file changed, 1 insertion(+) create mode 100644 rust-toolchain diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 000000000..0a3db35b2 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.46.0 From ca29cf576772ed936fb85073d7afd1b55deb6166 Mon Sep 17 00:00:00 2001 From: Shingo Kato Date: Fri, 18 Sep 2020 16:19:43 +0000 Subject: [PATCH 2/4] ci: use rust-toolchain version as stable version --- .github/workflows/ci.yml | 14 ++++++++++---- .github/workflows/release.yml | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fe145390..20077d74d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable override: true - name: Install LLVM @@ -48,7 +47,16 @@ jobs: with: submodules: true + - name: Install toolchain + if: ${{ matrix.config.toolchain == 'stable' }} + uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true + components: rustfmt + - name: Install ${{ matrix.config.toolchain }} toolchain + if: ${{ matrix.config.toolchain != 'stable' }} uses: actions-rs/toolchain@v1 with: profile: minimal @@ -73,7 +81,7 @@ jobs: crate: mdbook version: latest use-tool-cache: true - + - name: mdbook test if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.toolchain == 'stable' }} run: mdbook test book -L target/debug/deps @@ -98,7 +106,6 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable override: true components: clippy, rustfmt @@ -128,7 +135,6 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: stable override: true - name: Install LLVM diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa541694f..2387d265b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,6 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable override: true - name: Install LLVM From 9a97c8a1659a6eaa59f25a7a67dea5ef29a9e549 Mon Sep 17 00:00:00 2001 From: Shingo Kato Date: Sat, 19 Sep 2020 14:27:13 +0000 Subject: [PATCH 3/4] ci: add rustfmt for tarpaulin job Without Rustfmt, cargo gen-syntax won't work, resulting in the grammar_is_fresh test failing. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20077d74d..fc4395c17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,9 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: + profile: minimal override: true + components: rustfmt - name: Install LLVM uses: ./.github/actions/install-llvm From a1fedcead4ed26fdbf8c8c7ea7927e4081fbbc09 Mon Sep 17 00:00:00 2001 From: Shingo Kato Date: Sun, 20 Sep 2020 12:16:05 +0000 Subject: [PATCH 4/4] ci: remove beta/nightly toolchain jobs --- .github/workflows/ci.yml | 26 ++++++-------------------- .github/workflows/release.yml | 2 +- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc4395c17..90aa06755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,45 +37,32 @@ jobs: fail-fast: false matrix: config: - - { os: "ubuntu-latest", toolchain: "stable"} - - { os: "ubuntu-latest", toolchain: "beta"} - - { os: "ubuntu-latest", toolchain: "nightly"} - - { os: "windows-2016", toolchain: "stable"} - - { os: "macOS-latest", toolchain: "stable"} + - { os: "ubuntu-latest"} + - { os: "windows-2016"} + - { os: "macOS-latest"} steps: - uses: actions/checkout@v2 with: submodules: true - name: Install toolchain - if: ${{ matrix.config.toolchain == 'stable' }} uses: actions-rs/toolchain@v1 with: profile: minimal override: true components: rustfmt - - name: Install ${{ matrix.config.toolchain }} toolchain - if: ${{ matrix.config.toolchain != 'stable' }} - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.config.toolchain }} - override: true - components: rustfmt - - name: Install LLVM uses: ./.github/actions/install-llvm - name: Cargo build - if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.toolchain == 'stable' }} + if: ${{ matrix.config.os == 'ubuntu-latest' }} uses: actions-rs/cargo@v1 - continue-on-error: ${{ matrix.config.toolchain == 'nightly' }} with: command: build - name: Install mdbook - if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.toolchain == 'stable' }} + if: ${{ matrix.config.os == 'ubuntu-latest' }} uses: actions-rs/install@v0.1 with: crate: mdbook @@ -83,12 +70,11 @@ jobs: use-tool-cache: true - name: mdbook test - if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.toolchain == 'stable' }} + if: ${{ matrix.config.os == 'ubuntu-latest' }} run: mdbook test book -L target/debug/deps - name: Cargo test uses: actions-rs/cargo@v1 - continue-on-error: ${{ matrix.config.toolchain == 'nightly' }} with: command: test args: -- --nocapture diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2387d265b..e0054c984 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: with: submodules: true - - name: Install ${{ matrix.config.toolchain }} toolchain + - name: Install toolchain uses: actions-rs/toolchain@v1 with: profile: minimal