Skip to content

Commit

Permalink
Merge branch 'master' into feature/llvm-19
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Sep 19, 2024
2 parents da520f5 + 37da284 commit 48e0dfd
Show file tree
Hide file tree
Showing 12 changed files with 513 additions and 442 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ concurrency:

jobs:
aarch64-musl-build:
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=2cpu-linux-arm64, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Build Crystal
uses: docker://jhass/crystal:1.0.0-alpine-build
uses: docker://crystallang/crystal:1.13.2-alpine-84codes-build
with:
args: make crystal
- name: Upload Crystal executable
Expand All @@ -26,7 +26,7 @@ jobs:
src/llvm/ext/llvm_ext.o
aarch64-musl-test-stdlib:
needs: aarch64-musl-build
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=4cpu-linux-arm64, "family=m7g", ram=16, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -38,12 +38,12 @@ jobs:
- name: Mark downloaded compiler as executable
run: chmod +x .build/crystal
- name: Run stdlib specs
uses: docker://jhass/crystal:1.0.0-alpine-build
uses: docker://crystallang/crystal:1.13.2-alpine-84codes-build
with:
args: make std_spec FLAGS=-Duse_pcre
args: make std_spec
aarch64-musl-test-compiler:
needs: aarch64-musl-build
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=4cpu-linux-arm64, "family=m7g", ram=16, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -55,17 +55,17 @@ jobs:
- name: Mark downloaded compiler as executable
run: chmod +x .build/crystal
- name: Run compiler specs
uses: docker://jhass/crystal:1.0.0-alpine-build
uses: docker://crystallang/crystal:1.13.2-alpine-84codes-build
with:
args: make primitives_spec compiler_spec FLAGS=-Dwithout_ffi
aarch64-gnu-build:
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=2cpu-linux-arm64, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
uses: actions/checkout@v4
- name: Build Crystal
uses: docker://jhass/crystal:1.0.0-build
uses: docker://crystallang/crystal:1.13.2-ubuntu-84codes-build
with:
args: make crystal
- name: Upload Crystal executable
Expand All @@ -77,7 +77,7 @@ jobs:
src/llvm/ext/llvm_ext.o
aarch64-gnu-test-stdlib:
needs: aarch64-gnu-build
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=4cpu-linux-arm64, "family=m7g", ram=16, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -89,12 +89,12 @@ jobs:
- name: Mark downloaded compiler as executable
run: chmod +x .build/crystal
- name: Run stdlib specs
uses: docker://jhass/crystal:1.0.0-build
uses: docker://crystallang/crystal:1.13.2-ubuntu-84codes-build
with:
args: make std_spec
aarch64-gnu-test-compiler:
needs: aarch64-gnu-build
runs-on: [linux, ARM64]
runs-on: [runs-on, runner=4cpu-linux-arm64, "family=m7g", ram=16, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -106,6 +106,6 @@ jobs:
- name: Mark downloaded compiler as executable
run: chmod +x .build/crystal
- name: Run compiler specs
uses: docker://jhass/crystal:1.0.0-build
uses: docker://crystallang/crystal:1.13.2-ubuntu-84codes-build
with:
args: make primitives_spec compiler_spec
4 changes: 2 additions & 2 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
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
run: .\etc\win-ci\build-ffi.ps1 -BuildTree deps\ffi -Version 3.4.6
- name: Build zlib
if: steps.cache-libs.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-z.ps1 -BuildTree deps\z -Version 1.3.1
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
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
run: .\etc\win-ci\build-ffi.ps1 -BuildTree deps\ffi -Version 3.4.6 -Dynamic
- name: Build zlib
if: steps.cache-dlls.outputs.cache-hit != 'true'
run: .\etc\win-ci\build-z.ps1 -BuildTree deps\z -Version 1.3.1 -Dynamic
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## [1.13.3] (2024-09-18)

[1.13.3]: https://github.com/crystal-lang/crystal/releases/1.13.3

### Bugfixes

#### stdlib

- **[regression]** Fix use global paths in macro bodies ([#14965], thanks @straight-shoota)
- *(system)* **[regression]** Fix `Process.exec` stream redirection on Windows ([#14986], thanks @HertzDevil)
- *(text)* **[regression]** Fix `String#index` and `#rindex` for `Char::REPLACEMENT` ([#14937], thanks @HertzDevil)

[#14965]: https://github.com/crystal-lang/crystal/pull/14965
[#14986]: https://github.com/crystal-lang/crystal/pull/14986
[#14937]: https://github.com/crystal-lang/crystal/pull/14937

### Infrastructure

- Changelog for 1.13.3 ([#14991], thanks @straight-shoota)
- *(ci)* Enable runners from `runs-on.com` for Aarch64 CI ([#15007], thanks @straight-shoota)

[#14991]: https://github.com/crystal-lang/crystal/pull/14991
[#15007]: https://github.com/crystal-lang/crystal/pull/15007

## [1.13.2] (2024-08-20)

[1.13.2]: https://github.com/crystal-lang/crystal/releases/1.13.2
Expand Down
43 changes: 10 additions & 33 deletions etc/win-ci/build-ffi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,26 @@ param(
. "$(Split-Path -Parent $MyInvocation.MyCommand.Path)\setup.ps1"

[void](New-Item -Name (Split-Path -Parent $BuildTree) -ItemType Directory -Force)
Setup-Git -Path $BuildTree -Url https://github.com/winlibs/libffi.git -Ref libffi-$Version
Setup-Git -Path $BuildTree -Url https://github.com/crystal-lang/libffi.git -Ref v$Version

Run-InDirectory $BuildTree {
$args = "-DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=OFF"
if ($Dynamic) {
Replace-Text win32\vs16_x64\libffi\libffi.vcxproj 'StaticLibrary' 'DynamicLibrary'
$args = "-DBUILD_SHARED_LIBS=ON $args"
} else {
$args = "-DBUILD_SHARED_LIBS=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded $args"
}

echo '<Project>
<PropertyGroup>
<ForceImportAfterCppTargets>$(MsbuildThisFileDirectory)\Override.props</ForceImportAfterCppTargets>
</PropertyGroup>
</Project>' > 'Directory.Build.props'

echo "<Project>
<PropertyGroup>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
$(if ($Dynamic) {
'<PreprocessorDefinitions>FFI_BUILDING_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>'
} else {
'<RuntimeLibrary>MultiThreaded</RuntimeLibrary>'
})
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
</Project>" > 'Override.props'

MSBuild.exe /p:PlatformToolset=v143 /p:Platform=x64 /p:Configuration=Release win32\vs16_x64\libffi-msvc.sln -target:libffi:Rebuild
& $cmake . $args.split(' ')
& $cmake --build . --config Release
if (-not $?) {
Write-Host "Error: Failed to build libffi" -ForegroundColor Red
Exit 1
}
}

if ($Dynamic) {
mv -Force $BuildTree\win32\vs16_x64\x64\Release\libffi.lib libs\ffi-dynamic.lib
mv -Force $BuildTree\win32\vs16_x64\x64\Release\libffi.dll dlls\
mv -Force $BuildTree\Release\libffi.lib libs\ffi-dynamic.lib
mv -Force $BuildTree\Release\libffi.dll dlls\
} else {
mv -Force $BuildTree\win32\vs16_x64\x64\Release\libffi.lib libs\ffi.lib
mv -Force $BuildTree\Release\libffi.lib libs\ffi.lib
}
Loading

0 comments on commit 48e0dfd

Please sign in to comment.