ci: separate build and lint pipelines
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
name: C-lang CI
|
||||
name: Clang Build CI
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
paths:
|
||||
- '.github/workflows/build.yml'
|
||||
- 'src/*.c'
|
||||
- 'src/*.h'
|
||||
- 'configure.ac'
|
||||
- 'Makefile.am'
|
||||
|
||||
env:
|
||||
GCC_ARGS: src/*.c src/*.h -Ofast
|
||||
@@ -12,18 +20,11 @@ env:
|
||||
TEST_ARGS: ""
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: gcc
|
||||
run: gcc -v -Wall -Wextra -Werror $GCC_ARGS
|
||||
|
||||
build-release:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: aclocal
|
||||
run: aclocal
|
||||
- name: autoconf
|
||||
@@ -38,10 +39,10 @@ jobs:
|
||||
run: make distcheck
|
||||
|
||||
run:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: gcc
|
||||
run: mkdir -p build && gcc $GCC_ARGS -o build/$TARGET
|
||||
- name: run program
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Clang Lint CI
|
||||
|
||||
concurrency:
|
||||
group: lint-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/lint.yml'
|
||||
- 'src/*.c'
|
||||
- 'src/*.h'
|
||||
|
||||
env:
|
||||
GCC_ARGS: src/*.c src/*.h -Ofast
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
- name: gcc
|
||||
run: gcc -v -Wall -Wextra -Werror $GCC_ARGS
|
||||
Reference in New Issue
Block a user