Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/llvm-19
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Sep 17, 2024
2 parents 57aa0cd + 5c18900 commit 3a8eb18
Show file tree
Hide file tree
Showing 261 changed files with 5,975 additions and 1,764 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ parameters:
distribution-scripts-version:
description: "Git ref for version of https://github.com/crystal-lang/distribution-scripts/"
type: string
default: "96e431e170979125018bd4fd90111a3147477eec"
default: "da59efb2dfd70dcd7272eaecceffb636ef547427"
previous_crystal_base_url:
description: "Prefix for URLs to Crystal bootstrap compiler"
type: string
default: "https://github.com/crystal-lang/crystal/releases/download/1.12.2/crystal-1.12.2-1"
default: "https://github.com/crystal-lang/crystal/releases/download/1.13.2/crystal-1.13.2-1"

defaults:
environment: &env
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

test_darwin:
macos:
xcode: 13.4.1
xcode: 15.4.0
environment:
<<: *env
TRAVIS_OS_NAME: osx
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/interpreter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
test-interpreter_spec:
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.12.2-build
image: crystallang/crystal:1.13.2-build
name: "Test Interpreter"
steps:
- uses: actions/checkout@v4
Expand All @@ -24,7 +24,7 @@ jobs:
build-interpreter:
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.12.2-build
image: crystallang/crystal:1.13.2-build
name: Build interpreter
steps:
- uses: actions/checkout@v4
Expand All @@ -43,7 +43,7 @@ jobs:
needs: build-interpreter
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.12.2-build
image: crystallang/crystal:1.13.2-build
strategy:
matrix:
part: [0, 1, 2, 3]
Expand All @@ -67,7 +67,7 @@ jobs:
needs: build-interpreter
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.12.2-build
image: crystallang/crystal:1.13.2-build
name: "Test primitives_spec with interpreter"
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
crystal_bootstrap_version: [1.7.3, 1.8.2, 1.9.2, 1.10.1, 1.11.2, 1.12.2]
crystal_bootstrap_version: [1.7.3, 1.8.2, 1.9.2, 1.10.1, 1.11.2, 1.12.2, 1.13.2]
flags: [""]
include:
# libffi is only available starting from the 1.2.2 build images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: "1.12.2"
crystal: "1.13.2"

- name: Build libllvm_ext
run: make -B deps
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,26 @@ env:
CI_NIX_SHELL: true

jobs:
x86_64-darwin-test:
runs-on: macos-13
darwin-test:
runs-on: ${{ matrix.runs-on }}
name: ${{ matrix.arch }}
strategy:
matrix:
include:
- runs-on: macos-13
arch: x86_64-darwin
- runs-on: macos-14
arch: aarch64-darwin
steps:
- name: Download Crystal source
uses: actions/checkout@v4

- uses: cachix/install-nix-action@v26
- uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.9.2/install
extra_nix_config: |
experimental-features = nix-command
- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: crystal-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
Expand Down
66 changes: 24 additions & 42 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,34 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
openssl3:
libssl_test:
runs-on: ubuntu-latest
name: "OpenSSL 3.0"
container: crystallang/crystal:1.12.2-alpine
name: "${{ matrix.pkg }}"
container: crystallang/crystal:1.13.2-alpine
strategy:
fail-fast: false
matrix:
include:
- pkg: "openssl1.1-compat-dev=~1.1.1"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.18/community
- pkg: "openssl-dev=~3.0"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.17/main
- pkg: "openssl-dev=~3.3"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.20/main
- pkg: "libressl-dev=~3.4"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.15/community
- pkg: "libressl-dev=~3.5"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.16/community
- pkg: "libressl-dev=~3.8"
repository: http://dl-cdn.alpinelinux.org/alpine/v3.20/community
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev libxml2-static
- name: Upgrade alpine-keys
run: apk upgrade alpine-keys
- name: Install openssl 3.0
run: apk add "openssl-dev=~3.0" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.17/main
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
openssl111:
runs-on: ubuntu-latest
name: "OpenSSL 1.1.1"
container: crystallang/crystal:1.12.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev
- name: Install openssl 1.1.1
run: apk add "openssl1.1-compat-dev=~1.1.1" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.18/community
- name: Check LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
libressl34:
runs-on: ubuntu-latest
name: "LibreSSL 3.4"
container: crystallang/crystal:1.12.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Uninstall openssl
run: apk del openssl-dev openssl-libs-static
- name: Upgrade alpine-keys
run: apk upgrade alpine-keys
- name: Install libressl 3.4
run: apk add "libressl-dev=~3.4" --repository=http://dl-cdn.alpinelinux.org/alpine/v3.15/community
- name: Check LibSSL version
- name: Uninstall openssl and conflicts
run: apk del openssl-dev openssl-libs-static libxml2-static
- name: Install ${{ matrix.pkg }}
run: apk add "${{ matrix.pkg }}" --repository=${{ matrix.repository }}
- name: Print LibSSL version
run: bin/crystal eval 'require "openssl"; p! LibSSL::OPENSSL_VERSION, LibSSL::LIBRESSL_VERSION'
- name: Run OpenSSL specs
run: bin/crystal spec --order=random spec/std/openssl/
4 changes: 2 additions & 2 deletions .github/workflows/regex-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
pcre:
runs-on: ubuntu-latest
name: "PCRE"
container: crystallang/crystal:1.12.2-alpine
container: crystallang/crystal:1.13.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
Expand All @@ -25,7 +25,7 @@ jobs:
pcre2:
runs-on: ubuntu-latest
name: "PCRE2"
container: crystallang/crystal:1.12.2-alpine
container: crystallang/crystal:1.13.2-alpine
steps:
- name: Download Crystal source
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
matrix:
target:
- aarch64-linux-android
- aarch64-darwin
- arm-linux-gnueabihf
- i386-linux-gnu
- i386-linux-musl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
wasm32-test:
runs-on: ubuntu-latest
container: crystallang/crystal:1.12.2-build
container: crystallang/crystal:1.13.2-build
steps:
- name: Download Crystal source
uses: actions/checkout@v4
Expand Down
70 changes: 56 additions & 14 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

env:
SPEC_SPLIT_DOTS: 160
CI_LLVM_VERSION: "18.1.1"

jobs:
Expand All @@ -20,6 +21,13 @@ jobs:
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Set up Cygwin
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
with:
packages: make
install-dir: C:\cygwin64
add-to-path: false

- name: Download Crystal source
uses: actions/checkout@v4

Expand Down Expand Up @@ -49,7 +57,7 @@ jobs:
run: .\etc\win-ci\build-pcre2.ps1 -BuildTree deps\pcre2 -Version 10.43
- name: Build libiconv
if: steps.cache-libs.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-iconv.ps1 -BuildTree deps\iconv
run: .\etc\win-ci\build-iconv.ps1 -BuildTree deps\iconv -Version 1.17
- name: Build libffi
if: steps.cache-libs.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-ffi.ps1 -BuildTree deps\ffi -Version 3.3
Expand Down Expand Up @@ -92,6 +100,13 @@ jobs:
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Set up Cygwin
uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # v4
with:
packages: make
install-dir: C:\cygwin64
add-to-path: false

- name: Download Crystal source
uses: actions/checkout@v4

Expand All @@ -111,7 +126,7 @@ jobs:
libs/xml2-dynamic.lib
dlls/pcre.dll
dlls/pcre2-8.dll
dlls/libiconv.dll
dlls/iconv-2.dll
dlls/gc.dll
dlls/libffi.dll
dlls/zlib1.dll
Expand All @@ -130,7 +145,7 @@ jobs:
run: .\etc\win-ci\build-pcre2.ps1 -BuildTree deps\pcre2 -Version 10.43 -Dynamic
- name: Build libiconv
if: steps.cache-dlls.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-iconv.ps1 -BuildTree deps\iconv -Dynamic
run: .\etc\win-ci\build-iconv.ps1 -BuildTree deps\iconv -Version 1.17 -Dynamic
- name: Build libffi
if: steps.cache-dlls.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-ffi.ps1 -BuildTree deps\ffi -Version 3.3 -Dynamic
Expand Down Expand Up @@ -213,16 +228,16 @@ jobs:
if: steps.cache-llvm-dlls.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-llvm.ps1 -BuildTree deps\llvm -Version ${{ env.CI_LLVM_VERSION }} -TargetsToBuild X86,AArch64 -Dynamic

x86_64-windows:
x86_64-windows-release:
needs: [x86_64-windows-libs, x86_64-windows-dlls, x86_64-windows-llvm-libs, x86_64-windows-llvm-dlls]
uses: ./.github/workflows/win_build_portable.yml
with:
release: false
release: true
llvm_version: "18.1.1"

x86_64-windows-test:
runs-on: windows-2022
needs: [x86_64-windows]
needs: [x86_64-windows-release]
steps:
- name: Disable CRLF line ending substitution
run: |
Expand All @@ -237,7 +252,7 @@ jobs:
- name: Download Crystal executable
uses: actions/download-artifact@v4
with:
name: crystal
name: crystal-release
path: build

- name: Restore LLVM
Expand Down Expand Up @@ -265,13 +280,40 @@ jobs:
- name: Build samples
run: make -f Makefile.win samples

x86_64-windows-release:
if: github.repository_owner == 'crystal-lang' && (startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/ci/'))
needs: [x86_64-windows-libs, x86_64-windows-dlls, x86_64-windows-llvm-libs, x86_64-windows-llvm-dlls]
uses: ./.github/workflows/win_build_portable.yml
with:
release: true
llvm_version: "18.1.1"
x86_64-windows-test-interpreter:
runs-on: windows-2022
needs: [x86_64-windows-release]
steps:
- name: Disable CRLF line ending substitution
run: |
git config --global core.autocrlf false
- name: Download Crystal source
uses: actions/checkout@v4

- name: Download Crystal executable
uses: actions/download-artifact@v4
with:
name: crystal-release
path: build

- name: Restore LLVM
uses: actions/cache/restore@v4
with:
path: llvm
key: llvm-libs-${{ env.CI_LLVM_VERSION }}-msvc
fail-on-cache-miss: true

- name: Set up environment
run: |
Add-Content $env:GITHUB_PATH "$(pwd)\build"
Add-Content $env:GITHUB_ENV "CRYSTAL_SPEC_COMPILER_BIN=$(pwd)\build\crystal.exe"
- name: Run stdlib specs with interpreter
run: bin\crystal i spec\std_spec.cr

- name: Run primitives specs with interpreter
run: bin\crystal i spec\primitives_spec.cr

x86_64-windows-installer:
if: github.repository_owner == 'crystal-lang' && (startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/ci/'))
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/win_build_portable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:

- name: Install Crystal
uses: crystal-lang/install-crystal@v1
id: install-crystal
with:
crystal: "1.12.2"
crystal: "1.13.2"

- name: Download Crystal source
uses: actions/checkout@v4
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
libs/xml2-dynamic.lib
dlls/pcre.dll
dlls/pcre2-8.dll
dlls/libiconv.dll
dlls/iconv-2.dll
dlls/gc.dll
dlls/libffi.dll
dlls/zlib1.dll
Expand Down Expand Up @@ -107,14 +108,18 @@ jobs:
run: |
echo "CRYSTAL_LIBRARY_PATH=$(pwd)\libs" >> ${env:GITHUB_ENV}
echo "LLVM_CONFIG=$(pwd)\llvm\bin\llvm-config.exe" >> ${env:GITHUB_ENV}
# NOTE: the name of the libiconv DLL has changed, so we manually copy
# the new one to the existing Crystal installation; remove after
# updating the base compiler to 1.14
cp dlls/iconv-2.dll ${{ steps.install-crystal.outputs.path }}
- name: Build LLVM extensions
run: make -f Makefile.win deps

- name: Build Crystal
run: |
bin/crystal.bat env
make -f Makefile.win -B ${{ inputs.release && 'release=1' || '' }}
make -f Makefile.win -B ${{ inputs.release && 'release=1' || '' }} interpreter=1
- name: Download shards release
uses: actions/checkout@v4
Expand Down
Loading

0 comments on commit 3a8eb18

Please sign in to comment.