fix(judge): no bwrap in macos #129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux Static | |
on: | |
# push代码时触发workflow | |
push: | |
# 忽略README.md | |
paths-ignore: | |
- "README.md" | |
- "LICENSE" | |
- "BUILD.md" | |
# pull_request时触发workflow | |
pull_request: | |
# 忽略README.md | |
paths-ignore: | |
- "README.md" | |
- "LICENSE" | |
- "BUILD.md" | |
release: | |
types: [published] | |
jobs: | |
check_commit_msg: | |
outputs: | |
commit_message: ${{ steps.get_message.outputs.message }} | |
name: Check if the workflow has been disabled. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get commit message | |
id: get_message | |
run: | | |
echo "message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_OUTPUT | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Release, RelWithDebInfo] | |
needs: check_commit_msg | |
if: ${{ !contains( needs.check_commit_msg.outputs.commit_message, 'NO_DEB') }} | |
name: Linux Static ${{ matrix.build_type }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Get the version | |
id: get_version | |
shell: bash | |
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT | |
- name: Checking out sources | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Install build dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y build-essential ninja-build cmake pkgconf bash | |
sudo apt install -y libgl1-mesa-dev libglu1-mesa-dev | |
sudo apt install -y libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev | |
sudo apt install -y libharfbuzz-dev libsm-dev libdrm-dev | |
sudo apt install -y libspdlog-dev | |
- name: Install Qt | |
run: | | |
cd .. | |
wget https://github.com/Project-LemonLime/qt5ci/releases/latest/download/qt-5.15.3-kde-static-linux.tar.gz | |
tar -zxvf qt-5.15.3-kde-static-linux.tar.gz | |
- name: Build | |
run: | | |
cd .. | |
mkdir build | |
cd build | |
cmake ../Project_LemonLime -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DLEMON_BUILD_INFO="Build for Linux" -DLEMON_BUILD_EXTRA_INFO="Build on $(uname -sr)" -DCMAKE_PREFIX_PATH=../qt | |
cmake --build . --target package --parallel $(nproc) | |
cd .. | |
cd Project_LemonLime | |
cp ../build/lemon ./ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LemonLime-linux-x86_64-${{ matrix.build_type }} | |
path: lemon | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
if: startsWith(github.event.ref, 'refs/tags/') | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: lemon | |
asset_name: LemonLime-linux-x86_64-${{ matrix.build_type }} | |
tag: ${{ github.ref }} | |
overwrite: true |