Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d108db8

Browse files
committed
CI: make bash fail on errors
Errors were ignored before.
1 parent d559090 commit d108db8

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

.github/workflows/CI.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ jobs:
4242

4343
- name: Install Windows Conda Packages
4444
if: contains(matrix.os, 'windows')
45-
shell: bash -l {0}
45+
shell: bash -e -l {0}
4646
run: conda install m2-bison=3.0.4
4747

4848
- name: Install Linux / macOS Conda Packages
4949
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
50-
shell: bash -l {0}
50+
shell: bash -e -l {0}
5151
run: conda install bison=3.4
5252

5353
- name: Conda info
54-
shell: bash -l {0}
54+
shell: bash -e -l {0}
5555
run: |
5656
conda info
5757
conda list
5858
5959
- name: Setup Platform (Linux)
6060
if: contains(matrix.os, 'ubuntu')
61-
shell: bash -l {0}
61+
shell: bash -e -l {0}
6262
run: |
6363
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
6464
echo "WIN=0" >> $GITHUB_ENV
@@ -67,15 +67,15 @@ jobs:
6767
6868
- name: Setup Platform (macOS)
6969
if: contains(matrix.os, 'macos')
70-
shell: bash -l {0}
70+
shell: bash -e -l {0}
7171
run: |
7272
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
7373
echo "WIN=0" >> $GITHUB_ENV
7474
echo "MACOS=1" >> $GITHUB_ENV
7575
echo "ENABLE_RUNTIME_STACKTRACE=yes" >> $GITHUB_ENV
7676
7777
- name: Build (Linux / macOS)
78-
shell: bash -l {0}
78+
shell: bash -e -l {0}
7979
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
8080
run: |
8181
xonsh ci/build.xsh
@@ -95,7 +95,7 @@ jobs:
9595
xonsh ci\build.xsh
9696
9797
- name: Test (Linux / macOS)
98-
shell: bash -l {0}
98+
shell: bash -e -l {0}
9999
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
100100
run: |
101101
xonsh ci/test.xsh
@@ -216,7 +216,7 @@ jobs:
216216
key: ${{ github.job }}-${{ matrix.os }}
217217

218218
- name: Build Linux
219-
shell: bash -l {0}
219+
shell: bash -e -l {0}
220220
run: |
221221
./build0.sh
222222
cmake . -GNinja \
@@ -233,29 +233,29 @@ jobs:
233233
cmake --build . -j16 --target install
234234
235235
- name: PIP show version
236-
shell: bash -l {0}
236+
shell: bash -e -l {0}
237237
run: |
238238
python -m pip -V
239239
240240
- name: PIP install required packages
241-
shell: bash -l {0}
241+
shell: bash -e -l {0}
242242
run: |
243243
# Package lpynn has lpython_emulation as dependency
244244
# Hence, it should by default install lpython_emulation
245245
python -m pip install lpython_emulation==0.0.1.9 lpynn==0.0.1.4 numpy==1.24.3
246246
247247
- name: PIP show installed packages
248-
shell: bash -l {0}
248+
shell: bash -e -l {0}
249249
run: |
250250
python -m pip list
251251
252252
- name: Test PIP Packages with Python
253-
shell: bash -l {0}
253+
shell: bash -e -l {0}
254254
run: |
255255
python integration_tests/test_pip_import_01.py
256256
257257
- name: Test PIP Packages with LPython
258-
shell: bash -l {0}
258+
shell: bash -e -l {0}
259259
run: |
260260
pip_pkg_path=$(python -c "import site; print(site.getsitepackages()[0])")
261261
echo $pip_pkg_path
@@ -282,7 +282,7 @@ jobs:
282282
key: ${{ github.job }}-${{ matrix.os }}
283283

284284
- name: Build Linux
285-
shell: bash -l {0}
285+
shell: bash -e -l {0}
286286
run: |
287287
./build0.sh
288288
export CXXFLAGS="-Werror"
@@ -300,7 +300,7 @@ jobs:
300300
cmake --build . -j16 --target install
301301
302302
- name: Test Linux
303-
shell: bash -l {0}
303+
shell: bash -e -l {0}
304304
run: |
305305
ctest
306306
./run_tests.py -s
@@ -329,7 +329,7 @@ jobs:
329329
key: ${{ github.job }}-${{ matrix.os }}
330330

331331
- name: Build Linux
332-
shell: bash -l {0}
332+
shell: bash -e -l {0}
333333
run: |
334334
./build0.sh
335335
export CXXFLAGS="-Werror"
@@ -347,7 +347,7 @@ jobs:
347347
cmake --build . -j16 --target install
348348
349349
- name: Test Linux
350-
shell: bash -l {0}
350+
shell: bash -e -l {0}
351351
run: |
352352
ctest
353353
./run_tests.py -s
@@ -376,7 +376,7 @@ jobs:
376376
key: ${{ github.job }}-${{ matrix.os }}
377377

378378
- name: Build Linux
379-
shell: bash -l {0}
379+
shell: bash -e -l {0}
380380
run: |
381381
./build0.sh
382382
cmake . -GNinja \
@@ -393,7 +393,7 @@ jobs:
393393
cmake --build . -j16 --target install
394394
395395
- name: Test Linux
396-
shell: bash -l {0}
396+
shell: bash -e -l {0}
397397
run: |
398398
cd integration_tests
399399
./run_tests.py -b cpython c_py
@@ -421,7 +421,7 @@ jobs:
421421
key: ${{ github.job }}-${{ matrix.os }}
422422

423423
- name: Build
424-
shell: bash -l {0}
424+
shell: bash -e -l {0}
425425
run: |
426426
./build0.sh
427427
cmake . -G"Unix Makefiles" \
@@ -438,7 +438,7 @@ jobs:
438438
cmake --build . -j16 --target install
439439
440440
- name: Test
441-
shell: bash -l {0}
441+
shell: bash -e -l {0}
442442
run: |
443443
cd integration_tests
444444
./run_tests.py -b c_sym cpython_sym

0 commit comments

Comments
 (0)