Skip to content

nouse_install

nouse_install #1573

Workflow file for this run

name: nouse_install
on:
push:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
schedule:
- cron: '34 17 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check_skip:
uses: ./.github/workflows/check_skip_ci.yml
permissions:
contents: read
pull-requests: read
issues: read
nouse_install:
needs: [check_skip]
if: |
needs.check_skip.outputs.skip != 'true' && (
github.event_name == 'pull_request' ||
(github.event_name == 'push' &&
(vars.MMGH_PUSH_RUN_BRANCH == '*' ||
contains(vars.MMGH_PUSH_RUN_BRANCH, github.ref_name))) ||
(github.event_name == 'schedule' && vars.MMGH_NIGHTLY == 'enable'))
name: nouse_install_${{ matrix.os }}_Release
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ fromJSON(vars.MMGH_TIMEOUT_NOUSE_INSTALL || '30') }}
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: |
echo "::group::setup.py install build_ext"
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"
echo "::endgroup::"
- name: pytest
run: |
echo "::group::pytest"
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 ..
echo "::endgroup::"
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 }}