github: ci: Only run ci for some paths #130
This file contains 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
# ULPatch CI on github | |
name: CI | |
on: | |
push: | |
paths: | |
- 'cmake/**' | |
- 'man/**' | |
- 'scripts/**' | |
- 'src/**' | |
- archive.sh | |
- rpmbuild.sh | |
- ulpatch.spec | |
- CMakeLists.txt | |
branches: | |
- master | |
pull_request: | |
paths: | |
- 'cmake/**' | |
- 'man/**' | |
- 'scripts/**' | |
- 'src/**' | |
- archive.sh | |
- rpmbuild.sh | |
- ulpatch.spec | |
- CMakeLists.txt | |
permissions: | |
contents: write | |
jobs: | |
test_ulpatch: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt install -y cmake gcc binutils-dev elfutils libcapstone-dev \ | |
libelf-dev libunwind-dev tree bash-completion | |
- name: System info | |
run: ./.github/include/sysinfo.sh | |
- name: Build binary | |
run: ./.github/include/ci.sh | |
- name: Running ulpatch_test | |
run: ulpatch_test | |
test_ulpatch_fedora: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
fedora-version: [38, 41] | |
pie: [OFF, ON] | |
container: | |
image: "fedora:${{matrix.fedora-version}}" | |
# These options are required to be able to run lldb inside the container | |
options: "--cap-add=SYS_PTRACE --security-opt seccomp=unconfined" | |
volumes: | |
- ${{ github.workspace }}:/workdir/ulpatch/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo dnf install -y binutils-devel capstone-devel cmake \ | |
elfutils-devel elfutils-libelf-devel gcc gcc-c++ \ | |
glibc-devel libunwind-devel tree util-linux rpm-build \ | |
git dnf-plugins-core procps-ng | |
sudo dnf builddep -y ulpatch.spec | |
- name: System info | |
run: ./.github/include/sysinfo.sh | |
- name: Build binary | |
run: ./.github/include/ci.sh --pie=${{matrix.pie}} | |
- name: Running ulpatch_test | |
run: ulpatch_test | |
- name: Build RPMS | |
working-directory: /workdir/ulpatch/ | |
run: | | |
./archive.sh | |
./rpmbuild.sh --pie ${{matrix.pie}} |