alandefreitas / cpp-actions

GitHub Actions for C++ Libraries
https://alandefreitas.github.io/cpp-actions/
Boost Software License 1.0
19 stars 3 forks source link

Setup C++ failed #1

Closed Sunchock closed 1 year ago

Sunchock commented 1 year ago

Hi,

I would like to use Setup C++ action to use g++13 I'm using the runner image win22/20230508.3, when I copy what is in documentation and test, my Github Action fails on Setup C++ step with following error :

D:\a\_temp\08fae112-cf50-4bb8-a9d9-4d1cc9940928.sh: line 7: dpkg: command not found
Error: Process completed with exit code 127.

Here's the entire log of the step :

>Run alandefreitas/cpp-actions/setup-cpp@master
  with:
    compiler: g++-13
    version: *
    cache: false
    check-latest: false
    update-environment: true
    update-ld-library-path: false
    trace-commands: false
>Run # Strip version from input prefixed string
>Run alandefreitas/cpp-actions/setup-gcc@v1.2.1
  with:
    version: 13
    path: g++
    cache: false
    check-latest: false
    update-environment: true
    update-ld-library-path: false
    trace-commands: false
>Run # Strip version from input prefixed string
>Run alandefreitas/cpp-actions/package-install@v1.0.0
>Run # Find all GCC Release Versions
GCC versions: 10.1.0 10.2.0 10.3.0 10.4.0 11.1.0 11.2.0 11.3.0 11.4.0 12.1.0 12.2.0 12.3.0 13.1.0 2.8.0 2.8.1 2.95.0 2.95.1 2.95.2 2.95.3 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.4.0 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 5.1.0 5.2.0 5.3.0 5.4.0 5.5.0 6.1.0 6.2.0 6.3.0 6.4.0 6.5.0 7.1.0 7.2.0 7.3.0 7.4.0 7.5.0 8.1.0 8.2.0 8.3.0 8.4.0 8.5.0 9.1.0 9.2.0 9.3.0 9.4.0 9.5.0 
>Run # Find GCC Path Versions
>Run alandefreitas/cpp-actions/semver-utils@v1.1.0
>Run # Find all GCC System Versions
D:\a\_temp\08fae112-cf50-4bb8-a9d9-4d1cc9940928.sh: line 7: dpkg: command not found
Error: Process completed with exit code 127.
alandefreitas commented 1 year ago

Thanks for reporting this.

GCC binaries can be problematic but we are using GCC 13 now in another project and it has been working fine: https://github.com/cppalliance/mrdox/blob/develop/.github/workflows/ci.yml

I would usually ask you to enable trace-commands and send me the output, but considering your error:

D:\a\_temp\08fae112-cf50-4bb8-a9d9-4d1cc9940928.sh: line 7: dpkg: command not found

I assume you are trying to use GCC in a Windows image. That won't work because there are no GCC13 binaries for windows anywhere. You're basically replicating an environment that doesn't exist. You'll need to test it with MSVC or MinGW, although I'm still working on better MinGW integration.

Nonetheless, it's still worth having a warning message of some kind when this happens.