-
-
Notifications
You must be signed in to change notification settings - Fork 0
ci: split jobs and add release workflow #95
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
Merged
supermarsx
merged 4 commits into
main
from
smx/split-ci-jobs-for-lint,-format,-typecheck,-tests,-and-build-2025-09-11
Sep 12, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
656e364
ci: split jobs and add release workflow
supermarsx 7c6c55a
ci: install prerequisites for lint job
supermarsx a9250ce
Merge pull request #96 from supermarsx/smx/fix-comments-in-ci.yml-202…
supermarsx 7a53ae2
ci: build linux arm64 natively
supermarsx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| name: release | ||
|
|
||
| on: | ||
| push: | ||
| tags: ['v*'] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ matrix.os }}-${{ matrix.arch }} | ||
| runs-on: ${{ matrix.runner }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - runner: ubuntu-latest | ||
| os: linux | ||
| arch: x64 | ||
| preset: linux | ||
| artifact: LizardHook-linux-x64.tar.gz | ||
| ext: tar.gz | ||
| configure_args: "" | ||
| - runner: ubuntu-24.04-arm | ||
| os: linux | ||
| arch: arm64 | ||
| preset: linux | ||
| artifact: LizardHook-linux-arm64.tar.gz | ||
| ext: tar.gz | ||
| configure_args: "" | ||
| - runner: macos-latest | ||
| os: macos | ||
| arch: x64 | ||
| preset: macos | ||
| artifact: LizardHook-macos-x64.zip | ||
| ext: zip | ||
| configure_args: "-DCMAKE_OSX_ARCHITECTURES=x86_64" | ||
| - runner: macos-latest | ||
| os: macos | ||
| arch: arm64 | ||
| preset: macos | ||
| artifact: LizardHook-macos-arm64.zip | ||
| ext: zip | ||
| configure_args: "-DCMAKE_OSX_ARCHITECTURES=arm64" | ||
| - runner: windows-latest | ||
| os: windows | ||
| arch: x64 | ||
| preset: win-mingw | ||
| artifact: LizardHook-win-x64.zip | ||
| ext: zip | ||
| configure_args: "" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup prerequisites (Linux) | ||
| if: matrix.os == 'linux' | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y ninja-build xorg-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libx11-dev libxext-dev libasound2-dev libgtk-3-dev | ||
|
|
||
| - name: Setup prerequisites (macOS) | ||
| if: matrix.runner == 'macos-latest' | ||
| run: brew install ninja || true | ||
|
|
||
| - name: Setup MinGW (Windows) | ||
| if: matrix.runner == 'windows-latest' | ||
| uses: msys2/setup-msys2@v2 | ||
| with: | ||
| msystem: MINGW64 | ||
| install: mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja | ||
|
|
||
| - name: Configure | ||
| run: cmake --preset ${{ matrix.preset }} -DLIZARD_EMBED_ASSETS=ON ${{ matrix.configure_args }} | ||
| shell: bash | ||
|
|
||
| - name: Build | ||
| run: cmake --build build/${{ matrix.preset }} --config Release | ||
| shell: bash | ||
|
|
||
| - name: Install | ||
| run: cmake --install build/${{ matrix.preset }} --prefix install/${{ matrix.preset }}-${{ matrix.arch }} | ||
| shell: bash | ||
|
|
||
| - name: Package | ||
| run: | | ||
| cd install/${{ matrix.preset }}-${{ matrix.arch }} | ||
| if [ "${{ matrix.ext }}" = "tar.gz" ]; then | ||
| tar czf ../../${{ matrix.artifact }} * | ||
| else | ||
| zip -r ../../${{ matrix.artifact }} * | ||
| fi | ||
| shell: bash | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact }} | ||
| path: ${{ matrix.artifact }} | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Read version | ||
| id: ver | ||
| run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: LizardHook-* | ||
| path: dist | ||
| merge-multiple: true | ||
|
|
||
| - name: Generate changelog | ||
| run: | | ||
| prev_tag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") | ||
| git log ${prev_tag}..HEAD --pretty=format:'- %s' > changelog.md | ||
|
|
||
| - name: Create release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: v${{ steps.ver.outputs.version }} | ||
| name: Lizard Hook v${{ steps.ver.outputs.version }} | ||
| body_path: changelog.md | ||
| files: | | ||
| dist/LizardHook-win-x64.zip | ||
| dist/LizardHook-macos-x64.zip | ||
| dist/LizardHook-macos-arm64.zip | ||
| dist/LizardHook-linux-x64.tar.gz | ||
| dist/LizardHook-linux-arm64.tar.gz | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Ensure lint job installs tools and compile commands for clang-tidy
The lint workflow invokes
run-clang-tidy -p build/linuxright after configuration, but the job only installs theclang-tidypackage and never generates acompile_commands.json. On ubuntu runnersrun-clang-tidyis provided by theclang-toolspackage, so this step will fail before running any checks, and even if the script were present it would abort because no compilation database exists inbuild/linux. The job will therefore fail on every run. Consider installingclang-tools(orllvm) and enablingCMAKE_EXPORT_COMPILE_COMMANDS=ONor performing a build before callingrun-clang-tidy.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
clang-toolssorun-clang-tidyis available and generatecompile_commands.jsonby exporting compile commands during configuration .github/workflows/ci.ymlL13-L20Testing
actionlint .github/workflows/ci.yml(command not found: actionlint)cmake --preset linux -DLIZARD_EMBED_ASSETS=ON(gtk+-3.0 not found)View task →