Skip to content

Commit

Permalink
Split workflow into composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt committed Mar 5, 2024
1 parent b866667 commit 4a5cf10
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,14 @@ jobs:
- name: Install dependencies
run: |
pacman -Syu --noconfirm base-devel clang cmake extra-cmake-modules xcb-util xcb-util-keysyms
- name: Check out
uses: actions/checkout@v4
- name: Init CodeQL
uses: github/codeql-action/init@v3
with:
languages: c
- name: Configure
run: |
cmake -S . -B build
- name: Build
run: |
cmake --build build
- name: Build and Install
uses: ./
- name: Test
run: |
ctest --test-dir build
- name: Install
run: |
cmake --install build
ctest --test-dir xcb-imdkit/build
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v2
26 changes: 26 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Build and install xcb-imdkit'

inputs:
path:
description: 'Path to source code'
default: 'xcb-imdkit'
install-prefix:
description: 'Install prefix'

runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
repository: fcitx/xcb-imdkit
path: ${{ inputs.path }}
- name: Configure
run: |
cmake -S "${{ inputs.path }}" -B "${{ inputs.path }}"/build -DCMAKE_INSTALL_PREFIX="${{ inputs.install-prefix }}"
- name: Build
run: |
cmake --build "${{ inputs.path }}"/build
- name: Install
run: |
cmake --install "${{ inputs.path }}"/build
2 changes: 2 additions & 0 deletions uthash/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DisableFormat: true
SortIncludes: Never

0 comments on commit 4a5cf10

Please sign in to comment.