diff --git a/.github/workflows/ci-alpine.yml b/.github/workflows/ci-alpine.yml index d381aaefb5..81a1022050 100644 --- a/.github/workflows/ci-alpine.yml +++ b/.github/workflows/ci-alpine.yml @@ -1,14 +1,14 @@ name: ci-alpine -on: - workflow_call: +on: [ push, pull_request ] jobs: build-alpine: runs-on: ubuntu-latest container: image: alpine:latest - timeout-minutes: 10 + timeout-minutes: 5 + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v4 @@ -23,15 +23,13 @@ jobs: - name: Build default configuration run: | - mkdir build-default - # Tests must be run as a non-root user - adduser --home "$(pwd)/build-default" --no-create-home --disabled-password test users + adduser --home "$(pwd)" --no-create-home --disabled-password test users chown test:users -R $(pwd) sudo -u test -i \ - ../configure \ - --prefix="$(pwd)/build-default/install" \ + ./configure \ + --prefix="$(pwd)/install" \ --enable-mclib \ --enable-aspell diff --git a/.github/workflows/ci-fedora.yml b/.github/workflows/ci-fedora.yml index 35f197cdea..d778620be1 100644 --- a/.github/workflows/ci-fedora.yml +++ b/.github/workflows/ci-fedora.yml @@ -1,14 +1,14 @@ name: ci-fedora -on: - workflow_call: +on: [ push, pull_request ] jobs: build-fedora: runs-on: ubuntu-latest container: image: fedora:latest - timeout-minutes: 10 + timeout-minutes: 5 + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v4 @@ -26,15 +26,13 @@ jobs: - name: Build default configuration run: | - mkdir build-default - # Tests must be run as a non-root user - useradd --home "$(pwd)/build-default" test + useradd --home "$(pwd)" test chown test:test -R $(pwd) sudo -u test -i \ - ../configure \ - --prefix="$(pwd)/build-default/install" \ + ./configure \ + --prefix="$(pwd)/install" \ --enable-mclib \ --enable-aspell diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 498c64ce18..b1ef5f0f69 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -1,12 +1,12 @@ name: ci-macos -on: - workflow_call: +on: [ push, pull_request ] jobs: build-macos: runs-on: macos-latest - timeout-minutes: 10 + timeout-minutes: 5 + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository env: CFLAGS: -Wno-assign-enum @@ -26,12 +26,10 @@ jobs: - name: Build default configuration run: | - mkdir build-default && cd $_ - - ../configure \ - --prefix="$(pwd)/install" \ - --enable-mclib \ - --enable-aspell=/opt/homebrew + ./configure \ + --prefix="$(pwd)/install" \ + --enable-mclib \ + --enable-aspell=/opt/homebrew make -j$(sysctl -n hw.logicalcpu) make check diff --git a/.github/workflows/ci-ubuntu.yml b/.github/workflows/ci-ubuntu.yml index c68eac4f07..00c65fdb4c 100644 --- a/.github/workflows/ci-ubuntu.yml +++ b/.github/workflows/ci-ubuntu.yml @@ -1,12 +1,12 @@ name: ci-ubuntu -on: - workflow_call: +on: [ push, pull_request ] jobs: build-ubuntu: runs-on: ubuntu-latest timeout-minutes: 10 + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8703db4708..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: CI -on: [ push, pull_request ] - -jobs: - call-build-ubuntu: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - uses: ./.github/workflows/ci-ubuntu.yml - - call-build-fedora: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - uses: ./.github/workflows/ci-fedora.yml - - call-build-alpine: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - uses: ./.github/workflows/ci-alpine.yml - - call-build-macos: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - uses: ./.github/workflows/ci-macos.yml