Skip to content

Commit 1439fa1

Browse files
Copilotzijchen
andcommitted
Clean up check-lib workflow to only run on Linux
Co-authored-by: zijchen <13544267+zijchen@users.noreply.github.com>
1 parent 2066a01 commit 1439fa1

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

.github/workflows/check-lib.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ on: pull_request
33

44
jobs:
55
check-lib:
6-
name: Build main.js and diff on
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [windows-latest, ubuntu-latest]
6+
name: Build main.js and diff
7+
runs-on: ubuntu-latest
118
steps:
129
- name: Check out
1310
uses: actions/checkout@v4
@@ -18,33 +15,13 @@ jobs:
1815
npm run build
1916
2017
- name: Check if main.js has differences
21-
if: matrix.os != 'windows-latest'
2218
run: echo "diff=$(git diff --ignore-space-at-eol --text lib/main.js | wc -l)" >> $GITHUB_ENV
23-
24-
- name: Check if main.js has differences
25-
if: matrix.os == 'windows-latest'
26-
run: echo "diff=$(git diff --ignore-space-at-eol --text lib/main.js | wc -l)" >> $env:GITHUB_ENV
2719

2820
# If main.js was different than expected, upload the actual version
2921
- name: Upload actual main.js
3022
if: ${{ env.diff > 0}}
3123
uses: actions/upload-artifact@v4
3224
with:
33-
name: main.js-${{ matrix.os }}
25+
name: main.js
3426
path: lib/main.js
3527

36-
final-check:
37-
name: Check if main.js has differences on both Ubuntu and Windows
38-
runs-on: ubuntu-latest
39-
needs: check-lib
40-
steps:
41-
- name: Download artifact
42-
uses: actions/download-artifact@v4
43-
44-
- name: Check if both artifacts exist
45-
run: |
46-
ls -R
47-
if [ -d "main.js-windows-latest" ] && [ -d "main.js-ubuntu-latest" ]; then
48-
echo "main.js difference detected. Please check the artifacts for more details."
49-
exit 1
50-
fi

0 commit comments

Comments
 (0)