act icon indicating copy to clipboard operation
act copied to clipboard

libpam-runtime error when using setup-cpp action in act

Open DanWillans opened this issue 7 months ago β€’ 0 comments

Bug report info

act version:            0.2.64
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\willa\AppData\Local\act\actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.21.11
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.64 -X main.commit=aa54ea933591a57d1179c2691a57f2017aa855e5 -X main.date=2024-07-01T02:21:46Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         aa54ea933591a57d1179c2691a57f2017aa855e5
                vcs.time:             2024-07-01T02:21:27Z
                vcs.modified:         false
Docker Engine:
        Engine version:        26.1.4
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                16
        OS memory:             15962 MB
        Security options:
                name=seccomp,profile=unconfined

Command used with act

act -j Test --action-offline-mode --matrix os:ubuntu-20.04 -v

Describe issue

When trying to run my ubuntu-20.04 workflow in act the setup-cpp action attempts to install libpam-runtime. The installation of this library requires user input which then blocks the act from continuing.

|
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€PAM configuration─────────────────────────────┐
|  One or more of the files                                                β”‚
|  /etc/pam.d/common-{auth,account,password,session} have been locally     β”‚
|  modified. Please indicate whether these local changes should be         β”‚
|  overridden using the system-provided configuration. If you decline      β”‚
|  this option, you will need to manage your system's authentication       β”‚
|  configuration by hand.                                                  β”‚
|  β”‚                                                                       β”‚
|  Override local changes to /etc/pam.d/common-*?       ````

Act then is blocked from continuing.

### Link to GitHub repository

https://github.com/DanWillans/Evie

### Workflow content

```yml
name: ci
on:
  pull_request:
  release:
    types: [published]
  push:
    tags:
    branches:
      - main
      - develop

env:
  CLANG_TIDY_VERSION: "15.0.2"
  VERBOSE: 1


jobs:
  Test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false

      # Recommendations:
      #   * support at least 2 operating systems
      #   * support at least 2 compilers
      #   * make sure all supported configurations for your project are built
      #
      # Disable/enable builds in this list to meet the above recommendations
      # and your own projects needs
      matrix:
        os:
          - ubuntu-20.04
          # - macos-11
          # - windows-2019
        compiler:
          - llvm-15.0.2
          # - gcc-11
        generator:
          - "Ninja Multi-Config"
        build_type:
          # - Release
          - Debug
        packaging_maintainer_mode:
          - ON
          # - OFF

        exclude:
          # mingw is determined by this author to be too buggy to support
          - os: windows-2019
            compiler: gcc-11

          # gcc-11 on macos with glfw isn't compatible. Exclude for now.
          # Include g++-11 in the future as apparently that works - https://github.com/glfw/glfw/issues/1743
          - os: macos-11
            compiler: gcc-11

        include:
          # Add appropriate variables for gcov version required. This will intentionally break
          # if you try to use a compiler that does not have gcov set
          - compiler: gcc-11
            gcov_executable: gcov-10
            enable_ipo: On

          - compiler: llvm-15.0.2
            enable_ipo: Off
            gcov_executable: "llvm-cov gcov"

          - os: macos-11
            enable_ipo: Off

          # Set up preferred package generators, for given build configurations
          - build_type: Release
            packaging_maintainer_mode: OFF
            package_generator: TBZ2

          # This exists solely to make sure a non-multiconfig build works
          # - os: ubuntu-20.04
          #   compiler: gcc-11
          #   generator: "Unix Makefiles"
          #   build_type: Debug
          #   gcov_executable: gcov-11
          #   packaging_maintainer_mode: On
          #   enable_ipo: Off

          # Windows msvc builds
          - os: windows-2022
            compiler: msvc
            generator: "Visual Studio 17 2022"
            build_type: Debug
            packaging_maintainer_mode: On
            enable_ipo: On

          - os: windows-2022
            compiler: msvc
            generator: "Visual Studio 17 2022"
            build_type: Release
            packaging_maintainer_mode: On
            enable_ipo: On

          - os: windows-2022
            compiler: msvc
            generator: "Visual Studio 17 2022"
            build_type: Debug
            packaging_maintainer_mode: Off

          - os: windows-2022
            compiler: msvc
            generator: "Visual Studio 17 2022"
            build_type: Release
            packaging_maintainer_mode: Off
            package_generator: ZIP

          - os: windows-2022
            compiler: msvc
            generator: "Visual Studio 17 2022"
            build_type: Release
            packaging_maintainer_mode: On
            enable_ipo: On


    steps:
      - uses: actions/checkout@v3

      - name: Install Dependencies
        uses: ./.github/actions/install_dependencies

      - name: Check for llvm version mismatches
        if: ${{ contains(matrix.compiler, 'llvm') && !contains(matrix.compiler, env.CLANG_TIDY_VERSION) }}
        uses: actions/github-script@v3
        with:
          script: |
            core.setFailed('There is a mismatch between configured llvm compiler and clang-tidy version chosen')

      - name: Setup Cache
        uses: ./.github/actions/setup_cache
        with:
          compiler: ${{ matrix.compiler }}
          build_type: ${{ matrix.build_type }}
          packaging_maintainer_mode: ${{ matrix.packaging_maintainer_mode }}
          generator: ${{ matrix.generator }}

      - name: Project Name
        uses: cardinalby/export-env-action@v2
        with:
          envFile: '.github/constants.env'


      - name: Setup Cpp
        uses: aminya/setup-cpp@v1
        with:
          compiler: ${{ matrix.compiler }}
          vcvarsall: ${{ contains(matrix.os, 'windows' )}}

          cmake: true
          ninja: true
          vcpkg: false
          ccache: true
          clangtidy: ${{ env.CLANG_TIDY_VERSION }}


          cppcheck: true

          gcovr: true
          opencppcoverage: true

      - name: Configure CMake
        run: |
          cmake -S . -B ./build -G "${{matrix.generator}}" -D${{ env.PROJECT_NAME }}_ENABLE_IPO=${{matrix.enable_ipo }} -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -D${{ env.PROJECT_NAME }}_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.packaging_maintainer_mode}} -D${{ env.PROJECT_NAME }}_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DGIT_SHA:STRING=${{ github.sha }}

      - name: Build
        # Execute the build.  You can specify a specific target with "--target <NAME>"
        run: |
          cmake --build ./build --config ${{matrix.build_type}}
        
      - name: Unix - Test
        if: runner.os != 'Windows'
        # Execute tests defined by the CMake configuration.
        # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
        run: |
          ctest -C ${{matrix.build_type}} --test-dir ./build

      - name: Unix - Coverage
        if: runner.os != 'Windows'
        # Execute tests defined by the CMake configuration.
        # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
        run: |
          gcovr -j ${{env.nproc}} --gcov-executable '${{ matrix.gcov_executable }}' ./build --filter src/ --filter include/ --print-summary --xml-pretty --xml coverage.xml --delete --print-summary --txt

      - name: Windows - Test
        if: runner.os == 'Windows'
        working-directory: ./build
        run: |
          ctest -c ${{matrix.build_type}}

      # Turn off windows test and coverage at the moment as OpenCppCoverage doesn't do what I want
      # - name: Windows - Test and coverage
      #   if: runner.os == 'Windows'
      #   working-directory: ./build
      #   run: |
      #     OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children --excluded_modules *\vendor\* --excluded_modules *\examples\* --excluded_modules *\fuzz_test\* --modules Evie -- ctest -C ${{matrix.build_type}}

      - name: CPack
        if: matrix.package_generator != ''
        working-directory: ./build
        run: |
          cpack -C ${{matrix.build_type}} -G ${{matrix.package_generator}}

      - name: Publish Tagged Release
        uses: softprops/action-gh-release@v1
        if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.package_generator != '' }}
        with:
          files: |
            build/*-*${{ matrix.build_type }}*-*.*


      - name: Publish to codecov
        # Only publish CI to codecov if building in debug as we don't enable coverage for release builds
        if: matrix.build_type == 'Debug'
        uses: codecov/codecov-action@v3
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          flags: ${{ runner.os }}
          name: ${{ runner.os }}-coverage
          files: ./coverage.xml

Relevant log output

Very big log. Can provide specifics if necessary.

Additional information

No response

DanWillans avatar Jul 03 '24 12:07 DanWillans