Skip to content

Commit

Permalink
ci: apply default shell: bash to all CI jobs (#3416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed May 26, 2024
1 parent 1ad17ea commit 3855579
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
# Build and run benchmarks for all components except linter
benchmark:
Expand Down Expand Up @@ -89,7 +93,6 @@ jobs:
- name: Build benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
shell: bash
run: |
cargo build --release -p oxc_benchmark --bench ${{ matrix.component }} \
--no-default-features --features ${{ matrix.component }} --features codspeed
Expand Down Expand Up @@ -133,7 +136,6 @@ jobs:
- name: Build benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
shell: bash
run: |
cargo build --release -p oxc_benchmark --bench linter \
--no-default-features --features linter --features codspeed
Expand Down Expand Up @@ -172,7 +174,6 @@ jobs:
path: ./target/codspeed/oxc_benchmark

- name: Fix permission loss
shell: bash
run: |
ls ./target/codspeed/oxc_benchmark
chmod +x ./target/codspeed/oxc_benchmark/*
Expand Down Expand Up @@ -270,7 +271,6 @@ jobs:
# - name: Build Rust benchmark
# env:
# RUSTFLAGS: "-C debuginfo=2 -C strip=none -g --cfg codspeed"
# shell: bash
# run: |
# cargo build --release -p oxc_benchmark --bench parser_napi --no-default-features --features codspeed_napi
# mkdir -p target/codspeed/oxc_benchmark/
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

defaults:
run:
shell: bash

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release_napi_parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
check:
name: Check version
Expand Down Expand Up @@ -120,7 +124,6 @@ jobs:
### Build Done

- name: Move file on ${{ matrix.os }}
shell: bash
run: |
shopt -s extglob
ls target/${{ matrix.target }}/release/*.@(so|dll|dylib)
Expand All @@ -137,13 +140,11 @@ jobs:
# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Binary
if: runner.os == 'Windows'
shell: bash
run: 7z a ${{ matrix.code-target }}.zip napi/parser/parser.${{ matrix.code-target }}.node

# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Binary
if: runner.os != 'Windows'
shell: bash
run: tar czf ${{ matrix.code-target }}.tar.gz napi/parser/parser.${{ matrix.code-target }}.node

- name: Upload artifact
Expand Down Expand Up @@ -182,11 +183,9 @@ jobs:
args: unzip -qq *.zip -d .

- name: Untar
shell: bash
run: ls *.gz | xargs -i tar xvf {}

- name: Generate npm packages
shell: bash
run: |
ls
ls napi/parser
Expand All @@ -202,7 +201,6 @@ jobs:
- name: Publish npm packages as latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
# NOTE: The trailing slash on $package/ changes it to publishing the directory
run: |
# publish subpackages first
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
check:
name: Check version
Expand Down Expand Up @@ -97,7 +101,6 @@ jobs:
# The binary is zipped to fix permission loss https://github.com/actions/upload-artifact#permission-loss
- name: Archive Binary
if: runner.os == 'Windows'
shell: bash
run: |
BIN_NAME=oxlint-${{ matrix.code-target }}
mv target/${{ matrix.target }}/release/oxlint.exe $BIN_NAME.exe
Expand Down Expand Up @@ -158,7 +161,6 @@ jobs:
- name: Publish npm packages as latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
# NOTE: The trailing slash on $package/ changes it to publishing the directory
run: |
for package in npm/oxlint*
Expand All @@ -177,7 +179,6 @@ jobs:
fail_on_unmatched_files: true

- name: wait 3 minutes for smoke test
shell: bash
run: sleep 180s

smoke:
Expand All @@ -195,7 +196,6 @@ jobs:
container: ${{ matrix.container }}
steps:
- name: Test
shell: sh
run: |
touch test.js
ldd --version || true
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release_vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
check:
name: Check version
Expand Down Expand Up @@ -82,7 +86,6 @@ jobs:

- name: Build JS
working-directory: editors/vscode
shell: bash
run: |
pnpm install
pnpm run compile
Expand Down Expand Up @@ -117,7 +120,6 @@ jobs:
- name: Package Extension
working-directory: editors/vscode
shell: bash
run: |
ls ./target/release
pnpm exec vsce package -o "../../oxc_language_server-${{ matrix.code-target }}.vsix" --target ${{ matrix.code-target }}
Expand Down

0 comments on commit 3855579

Please sign in to comment.