@@ -27,13 +27,13 @@ jobs:
27 # clippy::match_bool is allowed by default from Rust 1.45.0, see
27 # clippy::match_bool is allowed by default from Rust 1.45.0, see
28 # https://github.com/rust-lang/rust-clippy/commit/e1d13c34b0beaea9a5fbf13687672ef85e779d9f
28 # https://github.com/rust-lang/rust-clippy/commit/e1d13c34b0beaea9a5fbf13687672ef85e779d9f
29 args: --all-targets --all-features -- --allow clippy::match_bool
29 args: --all-targets --all-features -- --allow clippy::match_bool
30− - name: Test
30+ - name: Run tests
31 uses: actions-rs/cargo@v1
31 uses: actions-rs/cargo@v1
33 command: test
33 command: test
35 test_with_new_syntaxes_and_themes:
35 test_with_new_syntaxes_and_themes:
36− name: Test with new syntaxes and themes
36+ name: Run tests with updated syntaxes and themes
37 runs-on: ubuntu-18.04
37 runs-on: ubuntu-18.04
39 - name: Git checkout
39 - name: Git checkout
@@ -94,8 +94,9 @@ jobs:
94 - { os: windows-2019 , target: x86_64-pc-windows-gnu }
94 - { os: windows-2019 , target: x86_64-pc-windows-gnu }
95 - { os: windows-2019 , target: x86_64-pc-windows-msvc }
95 - { os: windows-2019 , target: x86_64-pc-windows-msvc }
97− - name: Git checkout
97+ - name: Checkout source code
98 uses: actions/checkout@v2
98 uses: actions/checkout@v2
99 - name: Install prerequisites
100 - name: Install prerequisites
100 shell: bash
101 shell: bash
@@ -103,6 +104,7 @@ jobs:
103 arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
104 arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
104 aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
105 aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
106 - name: Extract crate information
108 - name: Extract crate information
107 shell: bash
109 shell: bash
@@ -110,6 +112,7 @@ jobs:
110 echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
112 echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
111 echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV
113 echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV
112 echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV
114 echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV
113 - name: Install Rust toolchain
116 - name: Install Rust toolchain
114 uses: actions-rs/toolchain@v1
117 uses: actions-rs/toolchain@v1
@@ -117,7 +120,8 @@ jobs:
117 target: ${{ matrix.job.target }}
120 target: ${{ matrix.job.target }}
118 override: true
121 override: true
119 profile: minimal # minimal component installation (ie, no documentation)
122 profile: minimal # minimal component installation (ie, no documentation)
124+ - name: Show version information (Rust, cargo, GCC)
121 shell: bash
125 shell: bash
123 gcc --version || true
127 gcc --version || true
@@ -126,13 +130,15 @@ jobs:
126 rustup default
130 rustup default
129 - name: Build
134 - name: Build
130 uses: actions-rs/cargo@v1
135 uses: actions-rs/cargo@v1
132 use-cross: ${{ matrix.job.use-cross }}
137 use-cross: ${{ matrix.job.use-cross }}
133 command: build
138 command: build
134 args: --release --target=${{ matrix.job.target }}
139 args: --release --target=${{ matrix.job.target }}
135− - name: Strip release bin
140+
141+ - name: Strip debug information from executable
136 id: strip
142 id: strip
137 shell: bash
143 shell: bash
@@ -167,7 +173,8 @@ jobs:
167 # Let subsequent steps know where to find the (stripped) bin
173 # Let subsequent steps know where to find the (stripped) bin
168 echo ::set-output name=BIN_PATH::${BIN_PATH}
174 echo ::set-output name=BIN_PATH::${BIN_PATH}
169 echo ::set-output name=BIN_NAME::${BIN_NAME}
175 echo ::set-output name=BIN_NAME::${BIN_NAME}
170− - name: Calculate test options
177+ - name: Set testing options
171 id: test-options
178 id: test-options
172 shell: bash
179 shell: bash
@@ -175,49 +182,57 @@ jobs:
175 unset CARGO_TEST_OPTIONS
182 unset CARGO_TEST_OPTIONS
176 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;
183 unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac;
177 echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
184 echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS}
178− - name: Test
186+ - name: Run tests
179 uses: actions-rs/cargo@v1
187 uses: actions-rs/cargo@v1
181 use-cross: ${{ matrix.job.use-cross }}
189 use-cross: ${{ matrix.job.use-cross }}
182 command: test
190 command: test
183 args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
191 args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
184− - name: bat test run
193+ - name: Run bat
185 uses: actions-rs/cargo@v1
194 uses: actions-rs/cargo@v1
187 use-cross: ${{ matrix.job.use-cross }}
196 use-cross: ${{ matrix.job.use-cross }}
188 command: run
197 command: run
189 args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs
198 args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs
190− - name: bat diagnostics output
200+ - name: Show diagnostics (bat --diagnostic)
191 uses: actions-rs/cargo@v1
201 uses: actions-rs/cargo@v1
193 use-cross: ${{ matrix.job.use-cross }}
203 use-cross: ${{ matrix.job.use-cross }}
194 command: run
204 command: run
195 args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic
205 args: --target=${{ matrix.job.target }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic
196− - name: Check features regex-onig
207+ - name: "Feature check: regex-onig"
197 uses: actions-rs/cargo@v1
208 uses: actions-rs/cargo@v1
199 use-cross: ${{ matrix.job.use-cross }}
210 use-cross: ${{ matrix.job.use-cross }}
200 command: check
211 command: check
201 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
212 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig
202− - name: Check features regex-onig,git
214+ - name: "Feature check: regex-onig,git"
203 uses: actions-rs/cargo@v1
215 uses: actions-rs/cargo@v1
205 use-cross: ${{ matrix.job.use-cross }}
217 use-cross: ${{ matrix.job.use-cross }}
206 command: check
218 command: check
207 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
219 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git
208− - name: Check features regex-onig,paging
221+ - name: "Feature check: regex-onig,paging"
209 uses: actions-rs/cargo@v1
222 uses: actions-rs/cargo@v1
211 use-cross: ${{ matrix.job.use-cross }}
224 use-cross: ${{ matrix.job.use-cross }}
212 command: check
225 command: check
213 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
226 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging
214− - name: Check features regex-onig,git,paging
228+ - name: "Feature check: regex-onig,git,paging"
215 uses: actions-rs/cargo@v1
229 uses: actions-rs/cargo@v1
217 use-cross: ${{ matrix.job.use-cross }}
231 use-cross: ${{ matrix.job.use-cross }}
218 command: check
232 command: check
219 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
233 args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging
235+ - name: Create tarball
221 id: package
236 id: package
222 shell: bash
237 shell: bash
@@ -254,7 +269,8 @@ jobs:
255 # Let subsequent steps know where to find the compressed package
270 # Let subsequent steps know where to find the compressed package
256 echo ::set-output name=PKG_PATH::"${PKG_STAGING}/${PKG_NAME}"
271 echo ::set-output name=PKG_PATH::"${PKG_STAGING}/${PKG_NAME}"
257− - name: Debian package
273+ - name: Create Debian package
258 id: debian-package
274 id: debian-package
259 shell: bash
275 shell: bash
260 if: startsWith(matrix.job.os, 'ubuntu')
276 if: startsWith(matrix.job.os, 'ubuntu')
@@ -362,23 +378,26 @@ jobs:
362 # build dpkg
378 # build dpkg
363 fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}"
379 fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}"
365− - name: Upload package artifact
381+ - name: "Artifact upload: tarball"
366 uses: actions/upload-artifact@master
382 uses: actions/upload-artifact@master
368 name: ${{ steps.package.outputs.PKG_NAME }}
384 name: ${{ steps.package.outputs.PKG_NAME }}
369 path: ${{ steps.package.outputs.PKG_PATH }}
385 path: ${{ steps.package.outputs.PKG_PATH }}
370− - name: Upload Debian package artifact
387+ - name: "Artifact upload: Debian package"
371 uses: actions/upload-artifact@master
388 uses: actions/upload-artifact@master
372 if: steps.debian-package.outputs.DPKG_NAME
389 if: steps.debian-package.outputs.DPKG_NAME
374 name: ${{ steps.debian-package.outputs.DPKG_NAME }}
391 name: ${{ steps.debian-package.outputs.DPKG_NAME }}
375 path: ${{ steps.debian-package.outputs.DPKG_PATH }}
392 path: ${{ steps.debian-package.outputs.DPKG_PATH }}
376 - name: Check for release
394 - name: Check for release
377 id: is-release
395 id: is-release
378 shell: bash
396 shell: bash
380 unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
398 unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
381 echo ::set-output name=IS_RELEASE::${IS_RELEASE}
399 echo ::set-output name=IS_RELEASE::${IS_RELEASE}
382 - name: Publish archives and packages
401 - name: Publish archives and packages
383 uses: softprops/action-gh-release@v1
402 uses: softprops/action-gh-release@v1
384 if: steps.is-release.outputs.IS_RELEASE
403 if: steps.is-release.outputs.IS_RELEASE