Skip to content

ci: add pull request workflow #1

ci: add pull request workflow

ci: add pull request workflow #1

Workflow file for this run

name: Validate code change
on: push
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.ref_name }}
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
ci-image-rebuild:
name: Trigger CI Image Rebuild
runs-on: ubuntu-latest
needs: [test, test-sanitized, clang-tidy]
if: github.repository == 'winft/wrapland' && github.ref_name == 'master'
env:
GITLAB_TARGET_ID: 17539846
steps:
- run: >
curl --request POST --form token=${{ secrets.GITLAB_CI_IMAGES_REBUILD }}
--form ref=master --form "variables[TRIGGER_TYPE]=wrapland_rebuild"
https://gitlab.com/api/v4/projects/${{ env.GITLAB_TARGET_ID }}/trigger/pipeline