Skip to content

Commit

Permalink
Merge branch 'master' into infra/shell.nix-nixpkgs-24.05
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Nov 4, 2024
2 parents b84a32b + 563d6d2 commit 0d1ec22
Show file tree
Hide file tree
Showing 414 changed files with 9,400 additions and 3,470 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.13.1/crystal-1.13.1-1"
default: "https://github.com/crystal-lang/crystal/releases/download/1.14.0/crystal-1.14.0-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
28 changes: 15 additions & 13 deletions .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ name: AArch64 CI

on: [push, pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

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 +28,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 +40,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=2cpu-linux-arm64, "family=m7g", ram=8, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -55,17 +57,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 +79,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 +91,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=2cpu-linux-arm64, "family=m7g", ram=8, "run-id=${{ github.run_id }}"]
if: github.repository == 'crystal-lang/crystal'
steps:
- name: Download Crystal source
Expand All @@ -106,6 +108,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
45 changes: 45 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docs

on:
push:
branches:
- master

permissions: {}

env:
TRAVIS_OS_NAME: linux

jobs:
deploy_api_docs:
if: github.repository_owner == 'crystal-lang'
env:
ARCH: x86_64
ARCH_CMD: linux64
runs-on: ubuntu-latest
steps:
- name: Download Crystal source
uses: actions/checkout@v4

- name: Prepare System
run: bin/ci prepare_system

- name: Prepare Build
run: bin/ci prepare_build

- name: Build docs
run: bin/ci with_build_env 'make crystal docs threads=1'

- name: Set revision
run: echo $GITHUB_SHA > ./docs/revision.txt

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy API docs to S3
run: |
aws s3 sync ./docs s3://crystal-api/api/master --delete
10 changes: 6 additions & 4 deletions .github/workflows/interpreter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Interpreter Test

on: [push, pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Expand All @@ -13,7 +15,7 @@ jobs:
test-interpreter_spec:
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.13.1-build
image: crystallang/crystal:1.14.0-build
name: "Test Interpreter"
steps:
- uses: actions/checkout@v4
Expand All @@ -24,7 +26,7 @@ jobs:
build-interpreter:
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.13.1-build
image: crystallang/crystal:1.14.0-build
name: Build interpreter
steps:
- uses: actions/checkout@v4
Expand All @@ -43,7 +45,7 @@ jobs:
needs: build-interpreter
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.13.1-build
image: crystallang/crystal:1.14.0-build
strategy:
matrix:
part: [0, 1, 2, 3]
Expand All @@ -67,7 +69,7 @@ jobs:
needs: build-interpreter
runs-on: ubuntu-22.04
container:
image: crystallang/crystal:1.13.1-build
image: crystallang/crystal:1.14.0-build
name: "Test primitives_spec with interpreter"
steps:
- uses: actions/checkout@v4
Expand Down
37 changes: 3 additions & 34 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Linux CI

on: [push, pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Expand All @@ -19,7 +21,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, 1.13.1]
crystal_bootstrap_version: [1.7.3, 1.8.2, 1.9.2, 1.10.1, 1.11.2, 1.12.2, 1.13.3, 1.14.0]
flags: [""]
include:
# libffi is only available starting from the 1.2.2 build images
Expand Down Expand Up @@ -106,36 +108,3 @@ jobs:

- name: Check Format
run: bin/ci format

deploy_api_docs:
if: github.repository_owner == 'crystal-lang' && github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
ARCH: x86_64
ARCH_CMD: linux64
runs-on: ubuntu-latest
steps:
- name: Download Crystal source
uses: actions/checkout@v4

- name: Prepare System
run: bin/ci prepare_system

- name: Prepare Build
run: bin/ci prepare_build

- name: Build docs
run: bin/ci with_build_env 'make crystal docs threads=1'

- name: Set revision
run: echo $GITHUB_SHA > ./docs/revision.txt

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy API docs to S3
run: |
aws s3 sync ./docs s3://crystal-api/api/master --delete
48 changes: 15 additions & 33 deletions .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: LLVM CI

on: [push, pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Expand All @@ -11,54 +13,34 @@ env:

jobs:
llvm_test:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
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"
llvm_ubuntu_version: "22.04"
- llvm_version: "17.0.6"
llvm_ubuntu_version: "22.04"
- llvm_version: "18.1.4"
llvm_ubuntu_version: "18.04"
- {llvm_version: 13, runs-on: ubuntu-22.04, codename: jammy}
- {llvm_version: 14, runs-on: ubuntu-22.04, codename: jammy}
- {llvm_version: 15, runs-on: ubuntu-22.04, codename: jammy}
- {llvm_version: 16, runs-on: ubuntu-22.04, codename: jammy}
- {llvm_version: 17, runs-on: ubuntu-24.04, codename: noble}
- {llvm_version: 18, runs-on: ubuntu-24.04, codename: noble}
- {llvm_version: 19, runs-on: ubuntu-24.04, codename: noble}
name: "LLVM ${{ matrix.llvm_version }}"
steps:
- name: Checkout Crystal source
uses: actions/checkout@v4

- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v4
with:
path: ./llvm
key: llvm-${{ matrix.llvm_version }}
if: "${{ !env.ACT }}"

- 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 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
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/${{ matrix.codename }}/ llvm-toolchain-${{ matrix.codename }}-${{ matrix.llvm_version }} main
sudo apt install -y llvm-${{ matrix.llvm_version }}-dev lld
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: "1.13.1"
crystal: "1.14.0"

- name: Build libllvm_ext
run: make -B deps
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: macOS CI

on: [push, pull_request]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
Expand All @@ -11,18 +13,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
Loading

0 comments on commit 0d1ec22

Please sign in to comment.