Skip to content

Commit b478c19

Browse files
committed
chore: Initial deno_core extraction
1 parent 50bd5d9 commit b478c19

File tree

9 files changed

+2405
-0
lines changed

9 files changed

+2405
-0
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Use Unix line endings in all text files.
2+
* text=auto eol=lf
3+
*.png -text

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
rust:
7+
name: deno_core-${{ matrix.os }}
8+
if: |
9+
(github.event_name == 'push' || !startsWith(github.event.pull_request.head.label, 'denoland:'))
10+
&& github.ref_name != 'deno_core'
11+
&& !startsWith(github.ref, 'refs/tags/deno/')
12+
runs-on: ${{ matrix.os }}
13+
timeout-minutes: 30
14+
strategy:
15+
matrix:
16+
os: [macOS-latest, ubuntu-latest, windows-2019]
17+
18+
env:
19+
CARGO_INCREMENTAL: 0
20+
GH_ACTIONS: 1
21+
RUST_BACKTRACE: full
22+
RUSTFLAGS: -D warnings
23+
24+
steps:
25+
- name: Clone repository
26+
uses: actions/checkout@v3
27+
28+
- name: Install Rust
29+
uses: dsherret/rust-toolchain-file@v1
30+
31+
- name: Install Deno
32+
uses: denoland/setup-deno@v1
33+
34+
- name: Format
35+
if: contains(matrix.os, 'ubuntu')
36+
run: |
37+
cargo fmt -- --check
38+
deno fmt --check
39+
40+
- name: Lint
41+
if: contains(matrix.os, 'ubuntu')
42+
run: |
43+
cargo clippy --locked --release --all-features --all-targets -- -D clippy::all
44+
deno lint
45+
46+
- name: Cargo build
47+
run: cargo build --locked --release --all-features --all-targets
48+
49+
- name: Cargo test
50+
run: cargo test --locked --release --all-features --all-targets
51+
52+
- name: Cargo publish
53+
if: |
54+
contains(matrix.os, 'ubuntu') &&
55+
github.repository == 'denoland/deno_core' &&
56+
startsWith(github.ref, 'refs/tags/')
57+
env:
58+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
59+
run: cargo publish -p serde_v8 && cargo publish -p deno_ops && cargo publish -p deno_core
60+
61+
- name: Get tag version
62+
if: contains(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags/')
63+
id: get_tag_version
64+
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
65+

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseKind:
7+
description: 'Kind of release'
8+
default: 'minor'
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
required: true
14+
15+
jobs:
16+
rust:
17+
name: release
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 30
20+
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v3
24+
with:
25+
token: ${{ secrets.DENOBOT_PAT }}
26+
27+
- uses: denoland/setup-deno@v1
28+
- uses: dsherret/rust-toolchain-file@v1
29+
30+
- name: Tag and release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.DENOBOT_PAT }}
33+
GH_WORKFLOW_ACTOR: ${{ github.actor }}
34+
run: |
35+
git config user.email "denobot@users.noreply.github.com"
36+
git config user.name "denobot"
37+
deno run -A https://raw.githubusercontent.com/denoland/automation/0.19.2/tasks/publish_release.ts --${{github.event.inputs.releaseKind}} deno_core

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
*.orig
2+
*.pyc
3+
*.swp
4+
.env
5+
6+
/.cargo_home/
7+
/.idea/
8+
/.vs/
9+
/.vscode/
10+
gclient_config.py_entries
11+
/target/
12+
/std/hash/_wasm/target
13+
/tools/wpt/manifest.json
14+
/test_napi/node_modules
15+
/test_napi/build
16+
/test_napi/third_party_tests/node_modules
17+
18+
# MacOS generated files
19+
.DS_Store
20+
.DS_Store?
21+
22+
# Flamegraphs
23+
/flamebench*.svg
24+
/flamegraph*.svg
25+
26+
# WPT generated cert files
27+
/tools/wpt/certs/index.txt*
28+
/tools/wpt/certs/serial*
29+
30+
/ext/websocket/autobahn/reports

.rustfmt.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
max_width = 80
2+
tab_spaces = 2
3+
edition = "2021"

0 commit comments

Comments
 (0)