Skip to content

Commit

Permalink
ci: add pull request workflow
Browse files Browse the repository at this point in the history
Jobs are mostly the same as in the change workflow.
  • Loading branch information
romangg committed Jan 31, 2024
1 parent 701a0b9 commit 3a91db6
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Validate pull request
on: pull_request
jobs:
message-lint:
name: Commit Message Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Lint commit messages
uses: ./.github/actions/message-lint
with:
upstream-repo: 'https://github.com/winft/wrapland.git'
source-branch: ${{ github.head_ref }}

clang-format:
name: Clang-Format
runs-on: ubuntu-latest
container:
image: archlinux
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- run: pacman -Sy --needed --quiet --noconfirm clang python
- run: bash tooling/analysis/clang-format.sh

build:
name: Build
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/kwinft/ci-images/archlinux/frameworks-master
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build
with:
artifact-name: 'build'

build-sanitized:
name: Build with Sanitizers
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/kwinft/ci-images/archlinux/frameworks-master
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build
with:
artifact-name: 'build-sanitized'
is-sanitized: 'true'

test:
name: Tests
runs-on: ubuntu-latest
needs: build
container:
image: registry.gitlab.com/kwinft/ci-images/archlinux/frameworks-master
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build
- name: Run tests
uses: ./.github/actions/test

test-sanitized:
name: Tests With Sanitizers
runs-on: ubuntu-latest
needs: build-sanitized
container:
image: registry.gitlab.com/kwinft/ci-images/archlinux/frameworks-master
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-sanitized
- name: Run tests
uses: ./.github/actions/test

clang-tidy:
name: Clang-Tidy
runs-on: ubuntu-latest
needs: build
container:
image: registry.gitlab.com/kwinft/ci-images/archlinux/frameworks-master
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build
- name: Untar artifact
run: tar -xzf build-dir.tar
- name: Run Clang-Tidy
run: bash tooling/analysis/clang-tidy.sh build

0 comments on commit 3a91db6

Please sign in to comment.