Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- windows-2022
- macos-10.15
dc:
Expand Down Expand Up @@ -40,14 +41,18 @@ jobs:
with:
compiler: ${{ matrix.dc }}

- name: Setup C++
- name: 'Non-Linux: Setup C++'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this change is needed, given that it was working fine before. Is there something special about Ubuntu 22.04?

Copy link
Contributor

@aminya aminya Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can explain the problem, I can fix it in setup-cpp.

setup-cpp already sets many of the needed variables; you should not need manual handling of it. Also, nothing has changed on Ubuntu 22.
https://github.com/aminya/setup-cpp/blob/43c67b8a9c5b5a98b07816e3ccfdb4758dba5f7d/src/llvm/llvm.ts#L72

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is to test whether it's working out of the box on at least 2 different Ubuntu versions, by installing the libclang-dev apt package, instead of doing some special GitHub-Actions setup that noone in real life uses on his dev box. (And had to work around by creating libclang.so symlinks manually, as we did at Symmetry.)

if: runner.os != 'Linux'
uses: aminya/setup-cpp@v1
with:
llvm: ${{ matrix.clang }}
- name: 'Linux: Install libclang-dev apt package'
if: runner.os == 'Linux'
run: sudo apt-get install -y libclang-dev

- name: Run tests
run: dub test -q --build=unittest-cov --arch=${{ matrix.arch }}
env:
LIBRARY_PATH: "${{ env.LLVM_PATH }}/lib"
LIBRARY_PATH: ${{ runner.os != 'Linux' && format('{0}/lib', env.LLVM_PATH) || '' }}

- uses: codecov/codecov-action@v3
2 changes: 2 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ libs "libclang" platform="windows"

lflags "-L/usr/local/opt/llvm/lib" platform="osx"
lflags "/LIBPATH:C:\\PROGRA~1\\LLVM\\lib" platform="windows"
# unversioned libclang.so symlink on Debian/Ubuntu:
lflags "-L/usr/lib/llvm-20/lib" "-L/usr/lib/llvm-19/lib" "-L/usr/lib/llvm-18/lib" "-L/usr/lib/llvm-17/lib" "-L/usr/lib/llvm-16/lib" "-L/usr/lib/llvm-15/lib" "-L/usr/lib/llvm-14/lib" "-L/usr/lib/llvm-13/lib" "-L/usr/lib/llvm-12/lib" "-L/usr/lib/llvm-11/lib" "-L/usr/lib/llvm-10/lib" "-L/usr/lib/llvm-9/lib" "-L/usr/lib/llvm-8/lib" "-L/usr/lib/llvm-7/lib" "-L/usr/lib/llvm-6.0/lib" platform="linux"


configuration "library" {
Expand Down