Skip to content

Commit 7100151

Browse files
Juarez Rudsatzjuarezr
authored andcommitted
refactor(ci): use bash as shell for all steps
1 parent f40c74f commit 7100151

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.github/workflows/build-release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@ jobs:
7272

7373
- name: Rustup Self Update
7474
if: matrix.platform != 'macos'
75+
shell: bash
7576
run: |
7677
rustup self update
7778
7879
- name: Update Rust toolchain from channel ${{ matrix.channel }}
80+
shell: bash
7981
run: |
8082
rustup update ${{ matrix.channel }}
8183
rustup default ${{ matrix.channel }}
8284
8385
- name: Check Rust ${{ matrix.channel }} toolchain versions
86+
shell: bash
8487
run: |
8588
rustup --version
8689
cargo --version
@@ -89,6 +92,7 @@ jobs:
8992
9093
- name: Install cargo plugins
9194
if: matrix.platform == 'linux'
95+
shell: bash
9296
run: cargo install cargo-deb cargo-generate-rpm
9397

9498
# endregion
@@ -102,9 +106,11 @@ jobs:
102106
mkdir -p target/assets
103107
104108
- name: Generate Assets
109+
shell: bash
105110
run: cargo run -- generate --all --output-dir target/assets
106111

107112
- name: Compiling the application for further packaging
113+
shell: bash
108114
run: cargo build --release
109115

110116
# endregion
@@ -113,20 +119,24 @@ jobs:
113119

114120
- name: Make a tar package for release (linux and macos)
115121
if: matrix.platform == 'linux' || matrix.platform == 'macos'
122+
shell: bash
116123
run: tar --directory=${{ env.TARGET_DIR }} -czvf ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz solrcopy
117124

118125
- name: Make a Windows zip package
119126
if: matrix.platform == 'windows'
127+
shell: bash
120128
run: |
121129
ls -lshFGHL ${{ env.TARGET_DIR }}
122130
zip -j ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.zip ${{ env.TARGET_DIR }}/solrcopy.exe
123131
124132
- name: Make the debian package
125133
if: matrix.platform == 'linux'
134+
shell: bash
126135
run: cargo deb --profile release --verbose --no-build --output ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb
127136

128137
- name: Make a rpm package
129138
if: matrix.platform == 'linux'
139+
shell: bash
130140
run: cargo generate-rpm --profile release --output ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm
131141

132142
# endregion
@@ -139,6 +149,7 @@ jobs:
139149
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140150
OWNER: ${{ github.repository_owner }}
141151
REPO: ${{ github.event.repository.name }}
152+
shell: bash
142153
run: |
143154
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm
144155
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb
@@ -150,11 +161,13 @@ jobs:
150161
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151162
OWNER: ${{ github.repository_owner }}
152163
REPO: ${{ github.event.repository.name }}
164+
shell: bash
153165
run: |
154166
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz
155167
156168
- name: Upload Windows Zip package
157169
if: matrix.platform == 'windows'
170+
shell: bash
158171
env:
159172
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160173
OWNER: ${{ github.repository_owner }}

.github/workflows/build-test-and-lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,19 @@ jobs:
6363

6464
- name: Rustup Self Update
6565
if: matrix.os != 'macos-latest'
66+
shell: bash
6667
run: |
6768
rustup self update
6869
6970
- name: Update Rust toolchain from channel ${{ matrix.channel }}
71+
shell: bash
7072
run: |
7173
rustup update ${{ matrix.channel }}
7274
rustup default ${{ matrix.channel }}
7375
rustup component add llvm-tools
7476
7577
- name: Check Rust ${{ matrix.channel }} toolchain versions
78+
shell: bash
7679
run: |
7780
printf '# Rust Information\n\n' >> "${GITHUB_STEP_SUMMARY}";
7881
@@ -94,6 +97,7 @@ jobs:
9497
# region Testing
9598

9699
- name: Run cargo check
100+
shell: bash
97101
run: cargo check --all-features
98102

99103
- name: Run Solr for testing
@@ -104,6 +108,7 @@ jobs:
104108
up-flags: "-d"
105109

106110
- name: Run cargo test
111+
shell: bash
107112
run: cargo test
108113

109114
# endregion
@@ -113,11 +118,13 @@ jobs:
113118
- name: Run cargo clippy
114119
if: matrix.os == 'ubuntu-latest'
115120
continue-on-error: true # show all errors
121+
shell: bash
116122
run: cargo clippy --all-features
117123

118124
- name: Check source code for future incompatibilities
119125
id: report_future_incompatibilities
120126
if: matrix.os == 'ubuntu-latest'
127+
shell: bash
121128
run: |
122129
echo '::group::Checking Future Incompatibilities';
123130
@@ -143,10 +150,12 @@ jobs:
143150
144151
- name: Run cargo fmt
145152
if: matrix.os == 'ubuntu-latest'
153+
shell: bash
146154
run: cargo fmt --check
147155

148156
- name: Run cargo doc
149157
if: matrix.os == 'ubuntu-latest'
158+
shell: bash
150159
run: cargo doc --no-deps --document-private-items --all-features
151160

152161
# endregion
@@ -159,6 +168,7 @@ jobs:
159168

160169
- name: Run coverage report
161170
if: matrix.os == 'ubuntu-latest'
171+
shell: bash
162172
run: cargo llvm-cov --all-features --workspace --lcov --no-cfg-coverage-nightly --output-path lcov.info
163173

164174
- name: Coveralls
@@ -186,13 +196,15 @@ jobs:
186196
ref: ${{ inputs.branch_commit_or_ref || '' }}
187197

188198
- name: Update Rust toolchain from channel ${{ matrix.channel }}
199+
shell: bash
189200
run: |
190201
rustup self update
191202
rustup update ${{ matrix.channel }}
192203
rustup update nightly
193204
rustup default ${{ matrix.channel }}
194205
195206
- name: Check Rust ${{ matrix.channel }} toolchain versions
207+
shell: bash
196208
run: |
197209
rustup --version
198210
cargo --version
@@ -205,25 +217,31 @@ jobs:
205217
# region Run security audit
206218

207219
- name: Intall cargo-audit from channel ${{ matrix.channel }}
220+
shell: bash
208221
run: cargo install cargo-auditable cargo-audit cargo-udeps
209222

210223
- name: Build with dependency lists embedded in the binaries
224+
shell: bash
211225
run: cargo auditable build --release
212226

213227
- name: Run security audit
228+
shell: bash
214229
run: cargo audit bin target/release/solrcopy
215230

216231
# endregion
217232

218233
# region Checking unused dependencies
219234

220235
- name: Print dependency tree
236+
shell: bash
221237
run: cargo tree --verbose --color never
222238

223239
- name: Intall cargo-udeps from channel ${{ matrix.channel }}
240+
shell: bash
224241
run: cargo install cargo-udeps
225242

226243
- name: Find unused dependencies in Cargo.toml
244+
shell: bash
227245
run: cargo +nightly udeps --release
228246

229247
# endregion

.github/workflows/security_audit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ jobs:
2828
ref: ${{ inputs.branch_commit_or_ref || '' }}
2929

3030
- name: Update Rust toolchain from channel ${{ matrix.channel }}
31+
shell: bash
3132
run: |
3233
rustup self update
3334
rustup update ${{ matrix.channel }}
3435
rustup default ${{ matrix.channel }}
3536
3637
- name: Check Rust ${{ matrix.channel }} toolchain versions
38+
shell: bash
3739
run: |
3840
rustup --version
3941
cargo --version
@@ -45,12 +47,15 @@ jobs:
4547
# region Run security audit
4648

4749
- name: Intall cargo-audit from channel ${{ matrix.channel }}
50+
shell: bash
4851
run: cargo install cargo-auditable cargo-audit
4952

5053
- name: Build with dependency lists embedded in the binaries
54+
shell: bash
5155
run: cargo auditable build --release
5256

5357
- name: Run security audit
58+
shell: bash
5459
run: cargo audit bin target/release/solrcopy
5560

5661
# endregion

0 commit comments

Comments
 (0)