Skip to content

Commit

Permalink
Merge branch 'master' into ipv6_loopback
Browse files Browse the repository at this point in the history
  • Loading branch information
beta-ziliani authored Dec 20, 2022
2 parents 3663384 + adfc4ce commit 3a87d82
Show file tree
Hide file tree
Showing 207 changed files with 4,760 additions and 3,373 deletions.
1 change: 0 additions & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
- arm-linux-gnueabihf
- i386-linux-gnu
- i386-linux-musl
- wasm32-unknown-wasi
- x86_64-dragonfly
- x86_64-freebsd
- x86_64-netbsd
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/wasm32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: WebAssembly CI

on: [push, pull_request]

env:
SPEC_SPLIT_DOTS: 160

jobs:
wasm32-test:
runs-on: ubuntu-latest
container: crystallang/crystal:1.6.1-build
steps:
- name: Download Crystal source
uses: actions/checkout@v3

- name: Install wasmtime
uses: mwilliamson/setup-wasmtime-action@v1
with:
wasmtime-version: "2.0.0"

- name: Install LLVM 13
run: |
apt-get update
apt-get install -y curl lsb-release wget software-properties-common gnupg
curl -O https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 13
ln -s $(which wasm-ld-13) /usr/bin/wasm-ld
- name: Download wasm32 libs
run: |
mkdir wasm32-wasi-libs
curl -LO https://github.com/lbguilherme/wasm-libs/releases/download/0.0.2/wasm32-wasi-libs.tar.gz
echo "114dd08b776c92e15b4ec83178fa486dc436e24b7f662c3241a8cdf2506fe426 wasm32-wasi-libs.tar.gz" | sha256sum -c -
tar -f wasm32-wasi-libs.tar.gz -C wasm32-wasi-libs -xz
rm wasm32-wasi-libs.tar.gz
- name: Build spec/wasm32_std_spec.cr
run: bin/crystal build spec/wasm32_std_spec.cr -o wasm32_std_spec.wasm --target wasm32-wasi
env:
CRYSTAL_LIBRARY_PATH: ${{ github.workspace }}/wasm32-wasi-libs

- name: Run wasm32_std_spec.wasm
run: |
wasmtime run wasm32_std_spec.wasm
4 changes: 2 additions & 2 deletions scripts/generate_grapheme_break_specs.cr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def string_or_char(string)
end

File.open(path, "w") do |file|
file.puts <<-CR
file.puts <<-CRYSTAL
# This file was automatically generated by running:
#
# scripts/generate_grapheme_break_spec.cr
Expand All @@ -33,7 +33,7 @@ File.open(path, "w") do |file|
require "./spec_helper"
describe "String#each_grapheme" do
CR
CRYSTAL
HTTP::Client.get(url).body.each_line do |line|
next if line.starts_with?('#')

Expand Down
8 changes: 4 additions & 4 deletions scripts/generate_ssl_server_defaults.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ DEFAULTS_FILE = "src/openssl/ssl/defaults.cr"
json = JSON.parse(HTTP::Client.get(url).body)

File.open(DEFAULTS_FILE, "w") do |file|
file.print <<-CR
file.print <<-CRYSTAL
# THIS FILE WAS AUTOMATICALLY GENERATED BY script/ssl_server_defaults.cr
# on #{Time.utc}.
abstract class OpenSSL::SSL::Context
CR
CRYSTAL

configuration = json["configurations"].as_h.each do |level, configuration|
clients = configuration["oldest_clients"].as_a
Expand All @@ -27,7 +27,7 @@ File.open(DEFAULTS_FILE, "w") do |file|
disabled_ciphers = %w(!RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS)
all_ciphers = ciphersuites + ciphers + disabled_ciphers

file.puts <<-CR
file.puts <<-CRYSTAL
# The list of secure ciphers on **#{level}** compatibility level as per Mozilla
# recommendations.
Expand All @@ -52,7 +52,7 @@ File.open(DEFAULTS_FILE, "w") do |file|
#
# See https://wiki.mozilla.org/Security/Server_Side_TLS for details.
CIPHER_SUITES_#{level.upcase} = "#{ciphersuites.join(":")}"
CR
CRYSTAL
end
file.puts "end"
end
4 changes: 2 additions & 2 deletions spec/compiler/codegen/cast_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,14 @@ describe "Code gen: cast" do
end

it "cast virtual metaclass type to nilable virtual instance type (#12628)" do
run(<<-CR).to_b.should be_true
run(<<-CRYSTAL).to_b.should be_true
abstract struct Base
end
struct Impl < Base
end
Base.as(Base | Base.class).as?(Base | Impl).nil?
CR
CRYSTAL
end
end
4 changes: 2 additions & 2 deletions spec/compiler/codegen/is_a_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -924,14 +924,14 @@ describe "Codegen: is_a?" do
end

it "virtual metaclass type is not virtual instance type (#12628)" do
run(<<-CR).to_b.should be_false
run(<<-CRYSTAL).to_b.should be_false
abstract struct Base
end
struct Impl < Base
end
Base.as(Base | Base.class).is_a?(Base | Impl)
CR
CRYSTAL
end
end
Loading

0 comments on commit 3a87d82

Please sign in to comment.