Skip to content

Commit c8eb1b3

Browse files
Hyper v1 (#72)
Upgrade to Hyper V1
1 parent 2e82355 commit c8eb1b3

24 files changed

+853
-952
lines changed

.cargo/config.toml

-50
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,3 @@
1-
[target.aarch64-unknown-linux-musl]
2-
rustflags = [
3-
"-Zpre-link-args=-target aarch64-linux-musl",
4-
"-Ctarget-feature=+lse,+crt-static",
5-
"-Ctarget-cpu=neoverse-n1",
6-
]
7-
linker = "./zigcc"
8-
ar = "zig ar"
9-
10-
[target.x86_64-unknown-linux-musl]
11-
rustflags = [
12-
"-Zpre-link-args=-target x86_64-linux-musl",
13-
"-Ctarget-feature=+crt-static",
14-
]
15-
linker = "./zigcc"
16-
ar = "zig ar"
17-
18-
19-
# [target.x86_64-apple-darwin]
20-
# rustflags = [
21-
# "-Zpre-link-args=-target x86_64-macos",
22-
# "-Cpanic=abort",
23-
# "-Zpanic_abort_tests",
24-
# ]
25-
# linker = "./zigcc"
26-
# ar = "zig ar"
27-
28-
# [target.aarch64-apple-darwin]
29-
# rustflags = [
30-
# "-Zpre-link-args=-target aarch64-macos",
31-
# "-Cpanic=abort",
32-
# "-Zpanic_abort_tests",
33-
# ]
34-
# linker = "./zigcc"
35-
# ar = "zig ar"
36-
37-
# [target.x86_64-pc-windows-gnu]
38-
# rustflags = [
39-
# "-Zpre-link-args=-target x86_64-windows-gnu",
40-
# "-Ctarget-feature=+crt-static",
41-
# ]
42-
# linker = "./zigcc"
43-
# ar = "zig ar"
44-
451
[unstable]
462
build-std = ["core", "compiler_builtins", "alloc", "std", "panic_abort"]
473
build-std-features = ["panic_immediate_abort"]
48-
49-
[env]
50-
CC_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
51-
CXX_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
52-
CC_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"
53-
CXX_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"

.github/workflows/build.yml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Setup, Build & Test
2+
on:
3+
workflow_call:
4+
inputs:
5+
os:
6+
required: true
7+
type: string
8+
platform:
9+
required: true
10+
type: string
11+
arch:
12+
required: true
13+
type: string
14+
15+
jobs:
16+
build:
17+
runs-on: ${{ inputs.os }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
cache: yarn
27+
node-version: lts/*
28+
- name: Install Linux dependencies
29+
if: inputs.platform == 'linux'
30+
run: |
31+
sudo apt-get -y update
32+
sudo apt-get -y install make nodejs
33+
sudo snap install zig --classic --beta
34+
- name: Install MacOS dependencies
35+
if: inputs.platform == 'darwin'
36+
env:
37+
HOMEBREW_NO_AUTO_UPDATE: 1
38+
run: |
39+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
40+
brew install zig make
41+
- name: Install Windows dependencies
42+
if: inputs.platform == 'windows'
43+
shell: pwsh
44+
run: |
45+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
46+
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
47+
scoop install make zig
48+
- name: Install JavaScript dependencies
49+
run: |
50+
corepack enable
51+
yarn
52+
- name: Setup Rust
53+
uses: dtolnay/rust-toolchain@v1
54+
with:
55+
toolchain: nightly
56+
- name: Cargo cache
57+
uses: actions/cache@v3
58+
continue-on-error: false
59+
with:
60+
path: |
61+
~/.cargo/bin/
62+
~/.cargo/registry/index/
63+
~/.cargo/registry/cache/
64+
~/.cargo/git/db/
65+
target/
66+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
67+
restore-keys: ${{ runner.os }}-cargo-
68+
- name: Run tests
69+
if: inputs.arch != 'aarch64' || inputs.platform != 'linux'
70+
run: |
71+
make test-ci
72+
- name: Run tests
73+
if: inputs.arch == 'aarch64' && inputs.platform == 'linux'
74+
env:
75+
_VIRTUAL_ENV: qemu-aarch64
76+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER: qemu-aarch64
77+
run: |
78+
sudo apt-get install -y \
79+
libc6-arm64-cross \
80+
libc6-dev-arm64-cross \
81+
crossbuild-essential-arm64 \
82+
qemu-system-arm \
83+
qemu-efi-aarch64 \
84+
qemu-utils \
85+
qemu-user
86+
87+
make CURRENT_TARGET=aarch64-unknown-linux-gnu test-ci

.github/workflows/ci.yml

+5-56
Original file line numberDiff line numberDiff line change
@@ -51,59 +51,8 @@ jobs:
5151
- os: macos-latest
5252
platform: darwin
5353
arch: aarch64
54-
# - os: windows-latest
55-
# platform: windows
56-
runs-on: ${{ matrix.os }}
57-
steps:
58-
- uses: actions/checkout@v4
59-
with:
60-
submodules: true
61-
- name: Setup Node.js
62-
uses: actions/setup-node@v4
63-
with:
64-
cache: yarn
65-
node-version: lts/*
66-
- name: Install Linux dependencies
67-
if: matrix.platform == 'linux'
68-
run: |
69-
sudo apt-get -y update
70-
sudo apt-get -y install make nodejs
71-
sudo snap install zig --classic --beta
72-
- name: Install MacOS dependencies
73-
if: matrix.platform == 'darwin'
74-
env:
75-
HOMEBREW_NO_AUTO_UPDATE: 1
76-
run: |
77-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
78-
brew install zig make
79-
- name: Install Windows dependencies
80-
if: matrix.platform == 'windows'
81-
shell: pwsh
82-
run: |
83-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
84-
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
85-
scoop install make zig
86-
- name: Install JavaScript dependencies
87-
run: |
88-
corepack enable
89-
yarn
90-
- name: Setup Rust
91-
uses: dtolnay/rust-toolchain@v1
92-
with:
93-
toolchain: nightly
94-
- name: Run tests
95-
if: matrix.arch != 'aarch64' || matrix.platform != 'linux'
96-
run: |
97-
make test-ci
98-
- name: Run tests
99-
if: matrix.arch == 'aarch64' && matrix.platform == 'linux'
100-
env:
101-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER: qemu-aarch64
102-
run: |
103-
sudo apt-get install -y \
104-
qemu-system-arm \
105-
qemu-efi-aarch64 \
106-
qemu-utils \
107-
qemu-user
108-
109-
make CURRENT_TARGET=aarch64-unknown-linux-musl test-ci
54+
uses: ./.github/workflows/build.yml
55+
with:
56+
os: ${{ matrix.os }}
57+
platform: ${{ matrix.platform }}
58+
arch: ${{ matrix.arch }}

.github/workflows/release.yml

+27-55
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,31 @@ on:
55
- "v*.*.*"
66

77
jobs:
8+
prebuild:
9+
strategy:
10+
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') }}
11+
matrix:
12+
include:
13+
- os: ubuntu-latest
14+
platform: linux
15+
arch: x86_64
16+
- os: ubuntu-latest
17+
platform: linux
18+
arch: aarch64
19+
- os: macos-latest
20+
platform: darwin
21+
arch: x86_64
22+
- os: macos-latest
23+
platform: darwin
24+
arch: aarch64
25+
uses: ./.github/workflows/build.yml
26+
with:
27+
os: ${{ matrix.os }}
28+
platform: ${{ matrix.platform }}
29+
arch: ${{ matrix.arch }}
830
build:
31+
needs:
32+
- prebuild
933
strategy:
1034
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') }}
1135
matrix:
@@ -24,58 +48,6 @@ jobs:
2448
arch: aarch64
2549
runs-on: ${{ matrix.os }}
2650
steps:
27-
- uses: actions/checkout@v4
28-
with:
29-
submodules: true
30-
- name: Setup Node.js
31-
uses: actions/setup-node@v4
32-
with:
33-
cache: yarn
34-
node-version: lts/*
35-
- name: Install Linux dependencies
36-
if: matrix.platform == 'linux'
37-
run: |
38-
sudo apt-get -y update
39-
sudo apt-get -y install make nodejs
40-
sudo snap install zig --classic --beta
41-
- name: Install MacOS dependencies
42-
if: matrix.platform == 'darwin'
43-
env:
44-
HOMEBREW_NO_AUTO_UPDATE: 1
45-
run: |
46-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
47-
brew install zig make
48-
- name: Install Windows dependencies
49-
if: matrix.platform == 'windows'
50-
shell: pwsh
51-
run: |
52-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
53-
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
54-
scoop install make zig
55-
- name: Install JavaScript dependencies
56-
run: |
57-
corepack enable
58-
yarn
59-
- name: Setup Rust
60-
uses: dtolnay/rust-toolchain@v1
61-
with:
62-
toolchain: nightly
63-
- name: Run tests
64-
if: matrix.arch != 'aarch64' || matrix.platform != 'linux'
65-
run: |
66-
make test-ci
67-
- name: Run tests
68-
if: matrix.arch == 'aarch64' && matrix.platform == 'linux'
69-
env:
70-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER: qemu-aarch64
71-
run: |
72-
sudo apt-get install -y \
73-
qemu-system-arm \
74-
qemu-efi-aarch64 \
75-
qemu-utils \
76-
qemu-user
77-
78-
make CURRENT_TARGET=aarch64-unknown-linux-musl test-ci
7951
- name: Build binaries
8052
run: |
8153
make release
@@ -111,9 +83,9 @@ jobs:
11183
body_path: ./changelog/CHANGELOG.md
11284
prerelease: contains(github.ref, 'beta') || contains(github.ref, 'alpha') || contains(github.ref, 'rc')
11385
files: |
114-
./artifacts-linux/llrt-lambda-x86.zip
86+
./artifacts-linux/llrt-lambda-x64.zip
11587
./artifacts-linux/llrt-lambda-arm64.zip
116-
./artifacts-linux/llrt-linux-x86.zip
88+
./artifacts-linux/llrt-linux-x64.zip
11789
./artifacts-linux/llrt-linux-arm64.zip
118-
./artifacts-darwin/llrt-macos-x86.zip
90+
./artifacts-darwin/llrt-macos-x64.zip
11991
./artifacts-darwin/llrt-macos-arm64.zip

0 commit comments

Comments
 (0)