Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Test against LLVM 13 #11343

Merged
29 changes: 29 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,35 @@ jobs:
- name: Test
run: bin/ci build

test_llvm:
env:
ARCH: x86_64
ARCH_CMD: linux64
strategy:
fail-fast: false
matrix:
include:
- llvm_version: 13.0.0
llvm_url: https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz
base_image: ubuntu-20.04
runs-on: ${{ matrix.base_image }}
name: "Test LLVM ${{ matrix.llvm_version }} (${{ matrix.base_image }})"
steps:
- name: Download Crystal source
uses: actions/checkout@v2

- name: Prepare System
run: bin/ci prepare_system

- name: Prepare Build
run: bin/ci prepare_build

- name: Install LLVM ${{ matrix.llvm_version }}
run: mkdir -p llvm && curl -L ${{ matrix.llvm_url }} > llvm.tar.xz && tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz

- name: Test
run: bin/ci with_build_env "make clean deps crystal std_spec compiler_spec LLVM_CONFIG=\$(pwd)/llvm/bin/llvm-config threads=1 junit_output=.junit/spec.xml"

test_preview_mt:
env:
ARCH: x86_64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ jobs:
uses: actions/cache@v2
with:
path: llvm
key: llvm-libs-10.0.0
key: llvm-libs-13.0.0
- name: Download LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
iwr https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/llvm-10.0.0.src.tar.xz -OutFile llvm.tar.xz
(Get-FileHash -Algorithm SHA256 .\llvm.tar.xz).hash -eq "df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf"
iwr https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/llvm-13.0.0.src.tar.xz -OutFile llvm.tar.xz
(Get-FileHash -Algorithm SHA256 .\llvm.tar.xz).hash -eq "408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020"
7z x llvm.tar.xz
7z x llvm.tar
mv llvm-* llvm-src
Expand Down
2 changes: 1 addition & 1 deletion src/socket/addrinfo.cr
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Socket
if value.is_a?(Socket::ConnectError)
raise Socket::ConnectError.from_os_error("Error connecting to '#{domain}:#{service}'", value.os_error)
else
{% if flag?(:win32) %}
{% if flag?(:win32) && compare_versions(Crystal::LLVM_VERSION, "13.0.0") < 0 %}
# FIXME: Workardound for https://github.com/crystal-lang/crystal/issues/11047
array = StaticArray(UInt8, 0).new(0)
{% end %}
Expand Down