diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index 831a694..0000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "pull-request", - "on": { - "push": { "branches": "main" }, - "pull_request": { "branches": "main" }, - }, - "jobs": { - "linux": { - "runs-on": "ubuntu-latest", - "container": "vathpela/efi-ci:f36-x64", - "steps": [ - { "uses": "actions/checkout@v2" }, - { "run": "dnf -y --nogpgcheck install efivar-devel gcc" }, - { "run": "dnf -y --nogpgcheck distro-sync" }, - { "run": "make" }, - ], - }, - }, -} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml new file mode 100644 index 0000000..80bd623 --- /dev/null +++ b/.github/workflows/pullrequest.yml @@ -0,0 +1,70 @@ +name: pull-request + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-pull-request-intel: + runs-on: ubuntu-24.04 + container: vathpela/efi-ci:${{ matrix.distro }}-x64 + name: ${{ matrix.distro }} ${{ matrix.arch }} build + + strategy: + fail-fast: false + matrix: + include: + - arch: amd64 + makearch: x86_64 + distro: centos9 + - arch: amd64 + makearch: x86_64 + distro: centos10 + - arch: amd64 + makearch: x86_64 + distro: f43 + - arch: amd64 + makearch: x86_64 + distro: f44 + - arch: amd64 + makearch: x86_64 + distro: f45 + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + # otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + submodules: recursive + - name: Work around directory ownership issue + id: ignore-ownership + run: | + git config --global --add safe.directory /__w/shim/shim + - name: Install some build requirements + id: dnf + run: | + dnf install -y efivar-devel nss-devel openssl-devel + - name: Run tests on ${{ matrix.distro }} for ${{ matrix.arch }} + id: test + run: | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir test + - name: Do the build on ${{ matrix.distro }} for ${{ matrix.arch }} + id: build + run: | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir all + - name: Install on ${{ matrix.distro }} for ${{ matrix.arch }} + id: install + run: | + make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir install + echo 'results:' + find /destdir -type f + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/src/pesum.c b/src/pesum.c index e4ddaf8..d72ed0e 100644 --- a/src/pesum.c +++ b/src/pesum.c @@ -141,7 +141,7 @@ main(int argc, char *argv[]) while ((infile = poptGetArg(optCon)) != NULL) { pesign_context *ctxp = NULL; - char *ext = strrchr(infile, '.'); + char const *ext = strrchr(infile, '.'); if (ext && strcmp(ext, ".ko") == 0) fmt = FORMAT_KERNEL_MODULE;