Giter Club home page Giter Club logo

setup-clang's People

Contributors

egor-tensin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

setup-clang's Issues

Cache support

Is it possible to use cache action like the following code?

     - name: Restore artifacts.
        uses: actions/cache@v2
        with:
          path: |
            ${{ **LLVM PATH HERE** }}
          key: |
            ${{ env.LLVM_VER}}

Running `apt-get update` fails after installing some old Clang versions

After installing one of the oldest Clang versions available (pre-5.0 on bionic, pre-9 on focal), any subsequent apt-get update will fail:

E: The repository 'http://apt.llvm.org/bionic llvm-toolchain-bionic-3.9 Release' does not have a Release file.
Error: Process completed with exit code 100.

It appears that these versions are not present on apt.llvm.org, even though they are in universe.

(setup-clang itself ignores this failure and carries on, though I'm not sure if this was intended on your part.)

It would be nice if the repo URL was checked first and omitted if missing. Or, failing that, a mention in the README advising running any apt-get update before setup-clang would help prevent some head-scratching. Thanks!

Action fails to install clang with "404"

Hello there @egor-tensin ,

Thank you for providing such useful github actions.

Unfortunately the workflow seems to be broken. Please see e.g. this workflow.

Relevant part of the logs:

Get:35 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main armhf Packages [6875 B]
Ign:27 https://apt.llvm.org/jammy llvm-toolchain-jammy-8 InRelease
Err:36 https://apt.llvm.org/jammy llvm-toolchain-jammy-8 Release
  404  Not Found [IP: 146.75.30.49 443]
Reading package lists...
E: The repository 'http://apt.llvm.org/jammy llvm-toolchain-jammy-8 Release' does not have a Release file.
Repository: 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-8 main'
Description:
Archive for codename: llvm-toolchain-jammy-8 components: main
More info: http://apt.llvm.org/jammy/
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/archive_uri-http_apt_llvm_org_jammy_-jammy.list

It seems that also the unit tests on this "setup-clang" repository are broken, see this link. Perhaps it is the same issue?

Fails to run on Windows runners: Invalid credentials specified

Since just now, trying to invoke this action from Github Actions' Windows runner fails:

Run egor-tensin/setup-clang@v1
  with:
    version: latest
    platform: x64
    cygwin: 0
    cc: 1
    hardlinks: 0
  env:
    BUILD_TYPE: Release
    PIP_BREAK_SYSTEM_PACKAGES: 1
    pythonLocation: C:\hostedtoolcache\windows\Python\3.8.10\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.8.10\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
Run New-Variable os -Value 'Windows' -Option Constant
  New-Variable os -Value 'Windows' -Option Constant
  
  New-Variable linux_host -Value ($os -eq 'Linux') -Option Constant
  New-Variable cygwin_host -Value ('0' -eq '1') -Option Constant
  New-Variable windows_host -Value ($os -eq 'Windows' -and !$cygwin_host) -Option Constant
  
  New-Variable version -Value ('latest') -Option Constant
  New-Variable latest -Value ($version -eq 'latest') -Option Constant
  New-Variable x64 -Value ('x64' -eq 'x64') -Option Constant
  
  function Locate-Choco {
      $path = Get-Command 'choco' -ErrorAction SilentlyContinue
  '@
      }
  
      # IDK why, but without libiconv-devel, even a "Hello, world!"
      # C++ app cannot be compiled as of December 2020. Also, libstdc++
      # is required; it's simpler to install gcc-g++ for all the
      # dependencies.
      Install-Package clang gcc-g++ libiconv-devel llvm
  } elseif ($windows_host) {
      Install-Package llvm
  
      $bin_dir = Join-Path $env:ProgramFiles LLVM bin
      echo $bin_dir >> $env:GITHUB_PATH
  } else {
      throw "Sorry, installing Clang is unsupported on $os"
  }
  
  echo "clang=$clang"     >> $env:GITHUB_OUTPUT
  echo "clangxx=$clangxx" >> $env:GITHUB_OUTPUT
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    BUILD_TYPE: Release
    PIP_BREAK_SYSTEM_PACKAGES: 1
    pythonLocation: C:\hostedtoolcache\windows\Python\3.8.10\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.8.10\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
Chocolatey v2.2.2
Upgrading the following packages:
llvm
By upgrading, you accept licenses for the packages.
Invalid credentials specified.
Please provide credentials for: https://community.chocolatey.org/api/v2/
User name: Password: Chocolatey had an error on fv-az1105-743 (with user runneradmin):
System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read.
   at System.Console.ReadKey(Boolean intercept)
   at chocolatey.infrastructure.commandline.ReadKeyTimeout.ConsoleReadKey()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Unhandled Exception: System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected from a file. Try Console.Read.
   at System.Console.ReadKey(Boolean intercept)
   at chocolatey.infrastructure.commandline.ReadKeyTimeout.ConsoleReadKey()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
Error: Process completed with exit code 1.

It seems to be some kind of authentication issue with Chocolatey. I don't know if it is an intermittent error or something that needs to be addressed.

clang missing the libc++

hello, I using clang to compile my code, compile with libc++:

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()

it works in my localhost, but does not work in github action(it loses a lot of system headers, https://github.com/netcan/config-loader/runs/4703563002?check_suite_focus=true). When I remove the CMake code above, It works in github action but compiles failed in my localhost(I have checked it must compile with clang system headers, using libc++).

so how to keep the same CMake in localhost and github action?
https://github.com/netcan/config-loader/blob/c%2B%2B20/CMakeLists.txt#L12

OpenMP not found

Is it possible to install the OpenMP clang component using this action?

I need it for one of my projects,

32-Bit programs have no output

If I use clang++ with the command line switch "-m32", it produces a viable executable file, but the executable file does not have any text output (nothing send to stdout actually reaches stdout).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.