Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: make bash fail on errors #2194

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
CI: make bash fail on errors
Errors were ignored before.
  • Loading branch information
Shaikh-Ubaid authored and certik committed Jul 20, 2023
commit 58d0b360a4617f0599a9411a1f03cda0c9a3fd6f
42 changes: 21 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ jobs:

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

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

- name: Conda info
shell: bash -l {0}
shell: bash -e -l {0}
run: |
conda info
conda list

- name: Setup Platform (Linux)
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
shell: bash -e -l {0}
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
echo "WIN=0" >> $GITHUB_ENV
Expand All @@ -67,15 +67,15 @@ jobs:

- name: Setup Platform (macOS)
if: contains(matrix.os, 'macos')
shell: bash -l {0}
shell: bash -e -l {0}
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
echo "WIN=0" >> $GITHUB_ENV
echo "MACOS=1" >> $GITHUB_ENV
echo "ENABLE_RUNTIME_STACKTRACE=yes" >> $GITHUB_ENV

- name: Build (Linux / macOS)
shell: bash -l {0}
shell: bash -e -l {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
xonsh ci/build.xsh
Expand All @@ -95,7 +95,7 @@ jobs:
xonsh ci\build.xsh

- name: Test (Linux / macOS)
shell: bash -l {0}
shell: bash -e -l {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
xonsh ci/test.xsh
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
key: ${{ github.job }}-${{ matrix.os }}

- name: Build Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
./build0.sh
cmake . -GNinja \
Expand All @@ -233,29 +233,29 @@ jobs:
cmake --build . -j16 --target install

- name: PIP show version
shell: bash -l {0}
shell: bash -e -l {0}
run: |
python -m pip -V

- name: PIP install required packages
shell: bash -l {0}
shell: bash -e -l {0}
run: |
# Package lpynn has lpython_emulation as dependency
# Hence, it should by default install lpython_emulation
python -m pip install lpython_emulation==0.0.1.9 lpynn==0.0.1.4 numpy==1.24.3

- name: PIP show installed packages
shell: bash -l {0}
shell: bash -e -l {0}
run: |
python -m pip list

- name: Test PIP Packages with Python
shell: bash -l {0}
shell: bash -e -l {0}
run: |
python integration_tests/test_pip_import_01.py

- name: Test PIP Packages with LPython
shell: bash -l {0}
shell: bash -e -l {0}
run: |
pip_pkg_path=$(python -c "import site; print(site.getsitepackages()[0])")
echo $pip_pkg_path
Expand All @@ -282,7 +282,7 @@ jobs:
key: ${{ github.job }}-${{ matrix.os }}

- name: Build Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
./build0.sh
export CXXFLAGS="-Werror"
Expand All @@ -300,7 +300,7 @@ jobs:
cmake --build . -j16 --target install

- name: Test Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
ctest
./run_tests.py -s
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
key: ${{ github.job }}-${{ matrix.os }}

- name: Build Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
./build0.sh
export CXXFLAGS="-Werror"
Expand All @@ -347,7 +347,7 @@ jobs:
cmake --build . -j16 --target install

- name: Test Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
ctest
./run_tests.py -s
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
key: ${{ github.job }}-${{ matrix.os }}

- name: Build Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
./build0.sh
cmake . -GNinja \
Expand All @@ -393,7 +393,7 @@ jobs:
cmake --build . -j16 --target install

- name: Test Linux
shell: bash -l {0}
shell: bash -e -l {0}
run: |
cd integration_tests
./run_tests.py -b cpython c_py
Expand Down Expand Up @@ -421,7 +421,7 @@ jobs:
key: ${{ github.job }}-${{ matrix.os }}

- name: Build
shell: bash -l {0}
shell: bash -e -l {0}
run: |
./build0.sh
cmake . -G"Unix Makefiles" \
Expand All @@ -438,7 +438,7 @@ jobs:
cmake --build . -j16 --target install

- name: Test
shell: bash -l {0}
shell: bash -e -l {0}
run: |
cd integration_tests
./run_tests.py -b c_sym cpython_sym
Expand Down