diff --git a/.github/workflows/mingw-w64.yml b/.github/workflows/mingw-w64.yml index 8e5db39a5fa1..aecf1f2ca549 100644 --- a/.github/workflows/mingw-w64.yml +++ b/.github/workflows/mingw-w64.yml @@ -18,12 +18,13 @@ jobs: - name: Download Crystal source uses: actions/checkout@v4 - - name: Install LLVM 18 + - name: Install LLVM run: | + _llvm_major=$(wget -qO- https://raw.githubusercontent.com/msys2/MINGW-packages/refs/heads/master/mingw-w64-llvm/PKGBUILD | grep '_version=' | sed -E 's/_version=([0-9]+).*/\1/') sudo apt remove 'llvm-*' 'libllvm*' wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc - sudo apt-add-repository -y deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main - sudo apt install -y llvm-18-dev + sudo apt-add-repository -y deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${_llvm_major} main + sudo apt install -y llvm-${_llvm_major}-dev - name: Install Crystal uses: crystal-lang/install-crystal@v1