From ca340f03b1ff121845a12f26f71a0d7b6501a7c7 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sun, 12 Mar 2023 12:30:52 +0800 Subject: [PATCH 01/18] Support LLVM 16 --- src/llvm/ext/llvm-versions.txt | 2 +- src/llvm/ext/llvm_ext.cc | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/llvm/ext/llvm-versions.txt b/src/llvm/ext/llvm-versions.txt index 3895e35b2bcc..eee7a8d7f17d 100644 --- a/src/llvm/ext/llvm-versions.txt +++ b/src/llvm/ext/llvm-versions.txt @@ -1 +1 @@ -15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0 +16.0 15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0 diff --git a/src/llvm/ext/llvm_ext.cc b/src/llvm/ext/llvm_ext.cc index 0f38b389f802..b7f33c55db0b 100644 --- a/src/llvm/ext/llvm_ext.cc +++ b/src/llvm/ext/llvm_ext.cc @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -26,11 +25,22 @@ using namespace llvm; #define LLVM_VERSION_LE(major, minor) \ (LLVM_VERSION_MAJOR < (major) || LLVM_VERSION_MAJOR == (major) && LLVM_VERSION_MINOR <= (minor)) +// TODO: remove after #13177 +#if LLVM_VERSION_GE(16, 0) +#include +#else +#include +#endif + #include #include #include #include +#if LLVM_VERSION_GE(16, 0) +#define makeArrayRef ArrayRef +#endif + typedef DIBuilder *DIBuilderRef; #define DIArray DINodeArray template T *unwrapDIptr(LLVMMetadataRef v) { @@ -238,7 +248,11 @@ LLVMMetadataRef LLVMExtDIBuilderCreatePointerType( uint64_t SizeInBits, uint64_t AlignInBits, const char *Name) { DIDerivedType *T = Dref->createPointerType(unwrapDI(PointeeType), SizeInBits, AlignInBits, +#if LLVM_VERSION_GE(16, 0) + std::nullopt, +#else None, +#endif Name); return wrap(T); } @@ -457,7 +471,7 @@ LLVMBool LLVMExtCreateMCJITCompilerForModule( .setOptLevel((CodeGenOpt::Level)options.OptLevel) .setTargetOptions(targetOptions); bool JIT; - if (Optional CM = unwrap(options.CodeModel, JIT)) + if (auto CM = unwrap(options.CodeModel, JIT)) builder.setCodeModel(*CM); if (options.MCJMM) builder.setMCJITMemoryManager( From 080dec35c051ad92bb5e38b4f2c8c9fb57e31a7d Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sun, 19 Mar 2023 10:57:56 +0800 Subject: [PATCH 02/18] add to CI --- .github/workflows/linux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2ab70c8c7dc2..33f8138b726f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -77,6 +77,9 @@ jobs: - llvm_version: 15.0.6 llvm_url: https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz base_image: ubuntu-22.04 + - llvm_version: 16.0.0 + llvm_url: https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz + base_image: ubuntu-22.04 runs-on: ${{ matrix.base_image }} name: "Test LLVM ${{ matrix.llvm_version }} (${{ matrix.base_image }})" steps: From dd133d90afee2c19bbcdbd35a46dbc1a5dd7bdbe Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 21 Mar 2023 01:47:31 +0800 Subject: [PATCH 03/18] test: match ubuntu version --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 33f8138b726f..65d6d0eb956e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -79,7 +79,7 @@ jobs: base_image: ubuntu-22.04 - llvm_version: 16.0.0 llvm_url: https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz - base_image: ubuntu-22.04 + base_image: ubuntu-18.04 runs-on: ${{ matrix.base_image }} name: "Test LLVM ${{ matrix.llvm_version }} (${{ matrix.base_image }})" steps: From bba9f511f7192bc0eae801fb923c6fb52146ef4b Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Thu, 30 Mar 2023 21:21:19 +0800 Subject: [PATCH 04/18] add `libtinfo5` --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 65d6d0eb956e..9a092c1a105a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -93,7 +93,7 @@ jobs: 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 + run: bin/ci with_build_env "apt-get install libtinfo5" && 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 compiler_spec crystal std_spec LLVM_CONFIG=\$(pwd)/llvm/bin/llvm-config threads=1 junit_output=.junit/spec.xml" From 4382f190bc5eb418f1b5c790ba152521bc48f190 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Thu, 30 Mar 2023 21:30:56 +0800 Subject: [PATCH 05/18] fixup1 --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9a092c1a105a..16abfa5e970f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -93,7 +93,7 @@ jobs: run: bin/ci prepare_build - name: Install LLVM ${{ matrix.llvm_version }} - run: bin/ci with_build_env "apt-get install libtinfo5" && mkdir -p llvm && curl -L ${{ matrix.llvm_url }} > llvm.tar.xz && tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz + run: bin/ci with_build_env "sudo apt-get install libtinfo5" && 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 compiler_spec crystal std_spec LLVM_CONFIG=\$(pwd)/llvm/bin/llvm-config threads=1 junit_output=.junit/spec.xml" From f52d554936201cd062787b37f5811ecf638bd2d9 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Thu, 30 Mar 2023 21:41:07 +0800 Subject: [PATCH 06/18] fixup2 --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 16abfa5e970f..d65a5ffaec2f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -93,7 +93,7 @@ jobs: run: bin/ci prepare_build - name: Install LLVM ${{ matrix.llvm_version }} - run: bin/ci with_build_env "sudo apt-get install libtinfo5" && mkdir -p llvm && curl -L ${{ matrix.llvm_url }} > llvm.tar.xz && tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz + run: apt-get install libtinfo5 && 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 compiler_spec crystal std_spec LLVM_CONFIG=\$(pwd)/llvm/bin/llvm-config threads=1 junit_output=.junit/spec.xml" From 62c7ac516072179855ab7211be025eb7a1e67197 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Thu, 30 Mar 2023 21:44:25 +0800 Subject: [PATCH 07/18] fixup3 --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d65a5ffaec2f..7fa0c76889b8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -93,7 +93,7 @@ jobs: run: bin/ci prepare_build - name: Install LLVM ${{ matrix.llvm_version }} - run: apt-get install libtinfo5 && mkdir -p llvm && curl -L ${{ matrix.llvm_url }} > llvm.tar.xz && tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz + run: sudo apt-get install -y libtinfo5 && 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 compiler_spec crystal std_spec LLVM_CONFIG=\$(pwd)/llvm/bin/llvm-config threads=1 junit_output=.junit/spec.xml" From cca22f4a96dd5a36cc09ceff6a8301b856744e2d Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Fri, 31 Mar 2023 23:09:23 +0800 Subject: [PATCH 08/18] re-add CI --- .github/workflows/llvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index d6f59d3f83e4..09fd55f58c89 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - llvm_version: ["13.0.0", "14.0.0", "15.0.6"] + llvm_version: ["13.0.0", "14.0.0", "15.0.6", "16.0.0"] name: "LLVM ${{ matrix.llvm_version }}" steps: - name: Checkout Crystal source From c14f5daeacb182b3a9405e8febeb127165e0d6b8 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sat, 1 Apr 2023 04:36:05 +0800 Subject: [PATCH 09/18] install `libtinfo5` --- .github/workflows/llvm.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index 09fd55f58c89..15a4a1421acc 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -36,6 +36,10 @@ jobs: version: "${{ matrix.llvm_version }}" cached: ${{ steps.cache-llvm.outputs.cache-hit }} + - name: Install libtinfo5 + run: apt-get install -y libtinfo5 + if: "{{ matrix.llvm_version == '16.0.0' }}" + - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action run: echo "LLVM_CONFIG=$LLVM_PATH/bin/llvm-config" >> $GITHUB_ENV From af0d92ff0325a56b1a0c8f2e375d393a0e9613dc Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sat, 1 Apr 2023 05:05:22 +0800 Subject: [PATCH 10/18] fixup --- .github/workflows/llvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index 15a4a1421acc..143a1ee4bf58 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -38,7 +38,7 @@ jobs: - name: Install libtinfo5 run: apt-get install -y libtinfo5 - if: "{{ matrix.llvm_version == '16.0.0' }}" + if: "${{ matrix.llvm_version == '16.0.0' }}" - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action From 9528ef6502e6847a4d36f62f851be4c53a08f5a8 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sat, 1 Apr 2023 05:38:08 +0800 Subject: [PATCH 11/18] sudo --- .github/workflows/llvm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index 143a1ee4bf58..c8fc79c453cd 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -37,7 +37,7 @@ jobs: cached: ${{ steps.cache-llvm.outputs.cache-hit }} - name: Install libtinfo5 - run: apt-get install -y libtinfo5 + run: sudo apt-get install -y libtinfo5 if: "${{ matrix.llvm_version == '16.0.0' }}" - name: Set LLVM_CONFIG From 7718860c2e2c70c2795b126bfb3010a46760e6b3 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sun, 2 Apr 2023 18:49:04 +0800 Subject: [PATCH 12/18] test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fe714d2ba393..411103122eb5 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ $(O)/std_spec: $(DEPS) $(SOURCES) $(SPEC_SOURCES) $(O)/compiler_spec: $(DEPS) $(SOURCES) $(SPEC_SOURCES) $(call check_llvm_config) @mkdir -p $(O) - $(EXPORT_CC) $(EXPORTS) ./bin/crystal build $(FLAGS) $(SPEC_WARNINGS_OFF) -o $@ spec/compiler_spec.cr --release + $(EXPORT_CC) $(EXPORTS) ./bin/crystal build $(FLAGS) $(SPEC_WARNINGS_OFF) -o $@ spec/compiler_spec.cr --debug $(O)/primitives_spec: $(O)/crystal $(DEPS) $(SOURCES) $(SPEC_SOURCES) @mkdir -p $(O) From 6e2dc1671f53d765655c9fb4df5ee441e9e733d9 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Sun, 2 Apr 2023 21:55:30 +0800 Subject: [PATCH 13/18] Revert "test" This reverts commit 7718860c2e2c70c2795b126bfb3010a46760e6b3. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 411103122eb5..fe714d2ba393 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ $(O)/std_spec: $(DEPS) $(SOURCES) $(SPEC_SOURCES) $(O)/compiler_spec: $(DEPS) $(SOURCES) $(SPEC_SOURCES) $(call check_llvm_config) @mkdir -p $(O) - $(EXPORT_CC) $(EXPORTS) ./bin/crystal build $(FLAGS) $(SPEC_WARNINGS_OFF) -o $@ spec/compiler_spec.cr --debug + $(EXPORT_CC) $(EXPORTS) ./bin/crystal build $(FLAGS) $(SPEC_WARNINGS_OFF) -o $@ spec/compiler_spec.cr --release $(O)/primitives_spec: $(O)/crystal $(DEPS) $(SOURCES) $(SPEC_SOURCES) @mkdir -p $(O) From f8634efe24e610a2e9fe0a38a9c7eaf9ce0cf366 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 2 May 2023 16:38:38 +0800 Subject: [PATCH 14/18] try 16.0.2 --- .github/workflows/llvm.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index c8fc79c453cd..e50dd31daf48 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - llvm_version: ["13.0.0", "14.0.0", "15.0.6", "16.0.0"] + llvm_version: ["13.0.0", "14.0.0", "15.0.6", "16.0.2"] name: "LLVM ${{ matrix.llvm_version }}" steps: - name: Checkout Crystal source @@ -36,9 +36,9 @@ jobs: version: "${{ matrix.llvm_version }}" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - - name: Install libtinfo5 - run: sudo apt-get install -y libtinfo5 - if: "${{ matrix.llvm_version == '16.0.0' }}" + # - name: Install libtinfo5 + # run: sudo apt-get install -y libtinfo5 + # if: "${{ matrix.llvm_version == '16.0.2' }}" - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action @@ -47,7 +47,7 @@ jobs: - name: Install Crystal uses: crystal-lang/install-crystal@v1 with: - crystal: "1.7.3" + crystal: "1.8.1" - name: Build libllvm_ext run: make -B deps From 1cf037555a0165e8b5937a18aaf53bb700630312 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 9 May 2023 20:52:44 +0800 Subject: [PATCH 15/18] 16.0.3 --- .github/workflows/llvm.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index e50dd31daf48..297f0ce031a0 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -15,7 +15,11 @@ jobs: strategy: fail-fast: false matrix: - llvm_version: ["13.0.0", "14.0.0", "15.0.6", "16.0.2"] + llvm_version: ["13.0.1", "14.0.6", "15.0.7"] + include: + - llvm_version: "16.0.3" + force_version: true + ubuntu_version: "22.04" name: "LLVM ${{ matrix.llvm_version }}" steps: - name: Checkout Crystal source @@ -36,9 +40,9 @@ jobs: version: "${{ matrix.llvm_version }}" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - # - name: Install libtinfo5 - # run: sudo apt-get install -y libtinfo5 - # if: "${{ matrix.llvm_version == '16.0.2' }}" + - name: Install libzstd-dev + run: sudo apt-get install -y libzstd-dev + if: "${{ matrix.llvm_version == '16.0.3' }}" - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action From 558df7e95400f28da5f8249d7bdd817c5bbfb474 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 9 May 2023 21:03:45 +0800 Subject: [PATCH 16/18] fixup --- .github/workflows/llvm.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index 297f0ce031a0..e4d90e6cac5d 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -38,11 +38,12 @@ jobs: - uses: KyleMayes/install-llvm-action@13d5d77cbf0bd7e35cb02a8f9ed4bb85bed3393b # v1.8.0 with: version: "${{ matrix.llvm_version }}" + force-version: "${{ matrix.force_version }}" + ubuntu-version: "${{ matrix.ubuntu_version }}" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - - name: Install libzstd-dev - run: sudo apt-get install -y libzstd-dev - if: "${{ matrix.llvm_version == '16.0.3' }}" + - name: Install dependencies + run: sudo apt-get install -y libtinfo5 libzstd-dev - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action @@ -51,7 +52,7 @@ jobs: - name: Install Crystal uses: crystal-lang/install-crystal@v1 with: - crystal: "1.8.1" + crystal: "1.8.2" - name: Build libllvm_ext run: make -B deps From 7183f2e7a0faf9f33adc08ed73f41507701d2816 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Tue, 9 May 2023 21:08:52 +0800 Subject: [PATCH 17/18] fixup2 --- .github/workflows/llvm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index e4d90e6cac5d..bc28359a45fa 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - llvm_version: ["13.0.1", "14.0.6", "15.0.7"] + llvm_version: ["13.0.0", "14.0.0", "15.0.6"] include: - llvm_version: "16.0.3" force_version: true @@ -43,7 +43,7 @@ jobs: cached: ${{ steps.cache-llvm.outputs.cache-hit }} - name: Install dependencies - run: sudo apt-get install -y libtinfo5 libzstd-dev + run: sudo apt-get install -y libtinfo5 - name: Set LLVM_CONFIG # LLVM_PATH is set by install-llvm-action From e257f808bf0afdfd3263fc33c35e29f396585448 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Wed, 10 May 2023 23:19:58 +0800 Subject: [PATCH 18/18] download from llvm-project directly --- .github/workflows/llvm.yml | 40 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index ed270b9c8aa3..061dd8f4f582 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -15,39 +15,41 @@ jobs: strategy: fail-fast: false matrix: - llvm_version: ["13.0.0", "14.0.0", "15.0.6"] include: + - llvm_version: "13.0.0" + llvm_ubuntu_version: "20.04" + - llvm_version: "14.0.0" + llvm_ubuntu_version: "18.04" + - llvm_version: "15.0.6" + llvm_ubuntu_version: "18.04" - llvm_version: "16.0.3" - force_version: true - ubuntu_version: "22.04" + llvm_ubuntu_version: "22.04" name: "LLVM ${{ matrix.llvm_version }}" steps: - name: Checkout Crystal source uses: actions/checkout@v3 - - name: Cache LLVM and Clang + - name: Cache LLVM id: cache-llvm uses: actions/cache@v3 with: - path: | - C:/Program Files/LLVM - ./llvm + path: ./llvm key: llvm-${{ matrix.llvm_version }} if: "${{ !env.ACT }}" - - uses: KyleMayes/install-llvm-action@13d5d77cbf0bd7e35cb02a8f9ed4bb85bed3393b # v1.8.0 - with: - version: "${{ matrix.llvm_version }}" - force-version: "${{ matrix.force_version }}" - ubuntu-version: "${{ matrix.ubuntu_version }}" - cached: ${{ steps.cache-llvm.outputs.cache-hit }} - - - name: Install dependencies - run: sudo apt-get install -y libtinfo5 + - name: Install LLVM ${{ matrix.llvm_version }} + run: | + mkdir -p llvm + curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.llvm_version }}/clang+llvm-${{ matrix.llvm_version }}-x86_64-linux-gnu-ubuntu-${{ matrix.llvm_ubuntu_version }}.tar.xz" > llvm.tar.xz + tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz + if: steps.cache-llvm.outputs.cache-hit != 'true' - - name: Set LLVM_CONFIG - # LLVM_PATH is set by install-llvm-action - run: echo "LLVM_CONFIG=$LLVM_PATH/bin/llvm-config" >> $GITHUB_ENV + - name: Set up LLVM + run: | + sudo apt-get install -y libtinfo5 + echo "PATH=$(pwd)/llvm/bin:$PATH" >> $GITHUB_ENV + echo "LLVM_CONFIG=$(pwd)/llvm/bin/llvm-config" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$(pwd)/llvm/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Install Crystal uses: crystal-lang/install-crystal@v1