Skip to content

nouse_install

nouse_install #1563

Workflow file for this run

name: nouse_install
on:
push:
pull_request:
schedule:
- cron: '34 17 * * *'
jobs:
nouse_install:
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && vars.MMGH_NIGHTLY == 'enable') }}
name: nouse_install_${{ matrix.os }}_Release
runs-on: ${{ matrix.os }}
env:
JOB_CMAKE_ARGS: -DBUILD_QT=OFF -DUSE_CLANG_TIDY=OFF -DCMAKE_BUILD_TYPE=Release
strategy:
matrix:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-26-Readme.md
os: [ubuntu-24.04, macos-26]
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: event name
run: |
echo "github.event_name: ${{ github.event_name }}"
- name: setup dependencies for Linux
if: runner.os == 'Linux'
uses: ./.github/actions/setup_linux
with:
workflow: 'nouse_install'
- name: setup dependencies for MacOS
if: runner.os == 'MacOS'
uses: ./.github/actions/setup_macos
with:
workflow: 'nouse_install'
- name: setup.py install build_ext
run: |
SUDO_CMD=""
if [ ${{ matrix.os }} == "ubuntu-24.04" ] ; then
SUDO_CMD="sudo"
fi
$SUDO_CMD python3 setup.py install build_ext \
--cmake-args="${JOB_CMAKE_ARGS} -DPYTHON_EXECUTABLE=$(which python3)" \
--make-args="VERBOSE=1"
- name: pytest
run: |
rm -rf tmp/
mkdir -p tmp/
cp -a tests tmp/
cd tmp/
python3 -c 'import os; print(os.getcwd())'
python3 -c "import modmesh; print(modmesh.__file__)"
python3 -c "import _modmesh; print(_modmesh.__file__)"
# The following command is the original commend, and it will fail on pytest == 8.0.0 .
# pytest --rootdir=/tmp -v
# Here is the issue and temporary solution: https://github.com/pytest-dev/pytest/issues/11781
# The alternative command to solve the issue is ```pytest --rootdir=. -v```.
pytest --rootdir=. -v
cd ..
send_email_on_failure:
needs: [nouse_install]
# Run if any of the dependencies failed in master branch
if: ${{ always() && contains(needs.*.result, 'failure') && github.ref_name == 'master' && github.event.repository.fork == false }}
uses: ./.github/workflows/send_email_on_fail.yml
with:
job_results: |
- nouse_install: ${{ needs.nouse_install.result }}
secrets:
EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}