Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
ci: use composite action for devbuild on ubuntu & macos runner
Signed-off-by: Ray Huang <bjhuang@cs.nycu.edu.tw>
  • Loading branch information
ExplorerRay committed Mar 13, 2026
commit 9cb34cf82cb7acc234e2ceef12ba9864ce12234c
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Setup modmesh CI dependencies on Linux
description: Sets up the necessary dependencies for running CI tests on Github action Linux runners
name: Set up modmesh CI dependencies on Linux
description: Set up the necessary dependencies for running CI tests on Github action Linux runners

inputs:
workflow:
description: The name of the workflow that will use this action
required: true

runs:
using: composite
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Add 8G swap
# Prevent hitting runner's resource limits when running clang-tidy
shell: bash
Expand Down Expand Up @@ -47,19 +48,14 @@ runs:
test -f /usr/share/doc/kitware-archive-keyring/copyright || \
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg
sudo apt-get -qy install kitware-archive-keyring
sudo apt-get -qy install \
sudo curl git build-essential make cmake libc6-dev gcc g++ \
python3 python3-dev python3-venv
# The path of apt-get cmake is `/usr/bin/cmake`,
# but the path of built-in cmake of runner image is `/usr/local/bin/cmake`.
# We remove the built-in cmake.
sudo rm -rf /usr/local/bin/cmake
# Install clang-tidy-21 from LLVM repository for full C++23 support
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get -qqy update
sudo apt-get -qy install \
sudo curl git build-essential make cmake libc6-dev gcc g++ silversearcher-ag \
clang-tidy-21 \
python3 python3-dev python3-venv
sudo ln -fs "$(which clang-tidy-21)" "/usr/local/bin/clang-tidy"

# Install qt6 only with ubuntu-24.04
# This page explains why we need libgl1-mesa-dev
# https://doc-snapshots.qt.io/qt6-dev/linux.html
Expand All @@ -75,7 +71,18 @@ runs:
# libgl1-mesa-dev
# fi

- name: install and configure gcc-14
- name: Install clang-tidy for lint
if: ${{ inputs.workflow == 'lint' }}
shell: bash
run: |
# Install clang-tidy-21 from LLVM repository for full C++23 support
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get -qqy update
sudo apt-get -qy install clang-tidy-21 silversearcher-ag
sudo ln -fs "$(which clang-tidy-21)" "/usr/local/bin/clang-tidy"

- name: Install and configure gcc-14
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
Expand All @@ -97,11 +104,18 @@ runs:
setup-python: 'false'
cache: false

- name: dependency by pip
- name: dependency by pip (common)
shell: bash
run: |
sudo pip3 install setuptools
sudo pip3 install numpy matplotlib pytest flake8 jsonschema pyside6==$(qmake6 -query QT_VERSION)
sudo pip3 install numpy pytest flake8

- name: dependency by pip (lint & build)
if: "${{ inputs.workflow == 'lint' || inputs.workflow == 'build' }}"
shell: bash
run: |
sudo pip3 install matplotlib jsonschema
sudo pip3 install pyside6==$(qmake6 -query QT_VERSION)

- name: dependency (manual)
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Setup modmesh CI dependencies on MacOS
description: Sets up the necessary dependencies for running CI tests on Github action MacOS runners
name: Set up modmesh CI dependencies on MacOS
description: Set up the necessary dependencies for running CI tests on Github action MacOS runners

inputs:
workflow:
description: The name of the workflow that will use this action
required: true

runs:
using: composite
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Creates /usr/local/include for macos runner
shell: bash
run: |
Expand Down Expand Up @@ -53,6 +54,12 @@ runs:
shell: bash
run: sudo NO_INSTALL_PREFIX=1 ${GITHUB_WORKSPACE}/contrib/dependency/install.sh pybind11

- name: dependency (manual) for build
if: ${{ inputs.workflow == 'build' }}
shell: bash
run: |
thirdparty/metal-cpp.sh

- name: show dependency
shell: bash
# Copy the commands from contrib/dependency/showdep.sh
Expand Down
Loading
Loading