Skip to content

Commit

Permalink
👷 Add GitHub Actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
ShellWen committed Oct 6, 2023
1 parent 7e1dabe commit 4b7ed2e
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: [ push, pull_request ]

name: CI

jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose --release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-release
path: target/release/*
20 changes: 20 additions & 0 deletions .github/workflows/clippy_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on: [ push, pull_request ]

name: Clippy check

env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run Clippy
run: cargo clippy --all-targets --all-features
17 changes: 17 additions & 0 deletions .github/workflows/rustfmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on: [ push, pull_request ]

name: Rustfmt

jobs:
rustfmt:
name: rustfmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
6 changes: 4 additions & 2 deletions crates/core/src/v8_exports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ pub const V8_STRING_UTF8LENGTH_SYMBOL: &str = "?Utf8Length@String@v8@@QEBAHPEAVI
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub const V8_STRING_WRITE_UTF8_SYMBOL: &str = "_ZNK2v86String9WriteUtf8EPNS_7IsolateEPciPii";
#[cfg(target_os = "windows")]
pub const V8_STRING_WRITE_UTF8_SYMBOL: &str = "?WriteUtf8@String@v8@@QEBAHPEAVIsolate@2@PEADHPEAHH@Z";
pub const V8_STRING_WRITE_UTF8_SYMBOL: &str =
"?WriteUtf8@String@v8@@QEBAHPEAVIsolate@2@PEADHPEAHH@Z";

#[cfg(any(target_os = "linux", target_os = "macos"))]
pub const V8_CONTEXT_GET_ISOLATE_SYMBOL: &str = "_ZN2v87Context10GetIsolateEv";
#[cfg(target_os = "windows")]
pub const V8_CONTEXT_GET_ISOLATE_SYMBOL: &str = "?GetIsolate@Context@v8@@QEAAPEAVIsolate@2@XZ";

#[cfg(any(target_os = "linux", target_os = "macos"))]
pub const V8_STRING_NEW_FROM_UTF8_PTR: &str = "_ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi";
pub const V8_STRING_NEW_FROM_UTF8_PTR: &str =
"_ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi";
#[cfg(target_os = "windows")]
pub const V8_STRING_NEW_FROM_UTF8_PTR: &str = "?NewFromUtf8@String@v8@@SA?AV?$MaybeLocal@VString@v8@@@2@PEAVIsolate@2@PEBDW4NewStringType@2@H@Z";

0 comments on commit 4b7ed2e

Please sign in to comment.