Skip to content

Commit

Permalink
First Release!
Browse files Browse the repository at this point in the history
  • Loading branch information
MunyDev committed Dec 19, 2022
1 parent 584e4cf commit c8d2615
Show file tree
Hide file tree
Showing 521 changed files with 167,810 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target-dir = "build"
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root=true

[*.js]
charset = utf-8
indent_style = space
indent_size = 4
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib/zstd/* linguist-vendored
lib/softfloat/* linguist-vendored
82 changes: 82 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: main
on:
push:
pull_request:
jobs:
jshint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- run: sudo npm install -g jshint; make jshint
test:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v2

- uses: actions/cache@v2
id: cache-rustup
with:
path: ~/.cache/rustup/
key: ${{ runner.os }}-rustup
- name: rustup
run: |
rustup toolchain install stable
rustup target add wasm32-unknown-unknown
rustup component add rustfmt
- name: apt install
run: sudo apt update -qq; sudo apt install nasm gdb qemu-system-x86 libc6-dev-i386
- name: make all-debug
run: make all-debug
- name: make all
run: make all

- uses: actions/cache@v2
id: cache-kvm-unit-test
with:
path: tests/kvm-unit-tests/
key: ${{ runner.os }}-kvm-unit-test
- name: build kvm-unit-test
if: steps.cache-kvm-unit-test.outputs.cache-hit != 'true'
run: (cd tests/kvm-unit-tests && ./configure && make x86/realmode.flat)
- name: kvm-unit-test
run: tests/kvm-unit-tests/run.js tests/kvm-unit-tests/x86/realmode.flat

- uses: actions/cache@v2
id: cache-nasmtests
with:
path: tests/nasm/build/
key: ${{ runner.os }}-nasmtests
- name: build namsmtests
if: steps.cache-nasmtests.outputs.cache-hit != 'true'
run: tests/nasm/create_tests.js; make -C tests/nasm all; ./tests/nasm/gen_fixtures.js
- name: nasmtests
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js
- name: nasmtests-force-jit
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js --force-jit

- name: rust-test
run: make rust-test

- uses: actions/cache@v2
id: cache-images
with:
path: images/
key: ${{ runner.os }}-images-v2
- name: get images
if: steps.cache-images.outputs.cache-hit != 'true'
run: wget -nv -P images/ https://k.copy.sh/{linux.iso,linux3.iso,linux4.iso,buildroot-bzimage.bin,TinyCore-11.0.iso,oberon.img,msdos.img,openbsd-floppy.img,kolibri.img,windows101.img,os8.img,freedos722.img,mobius-fd-release5.img}

- name: api-tests
run: make api-tests
- name: qemutests
run: make qemutests
- name: qemutests-release
run: make qemutests-release
- name: jitpagingtests
run: make jitpagingtests
- name: integration tests
run: MAX_PARALLEL_TESTS=1 make tests
- name: expect tests
run: make expect-tests
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
push:
branches:
- master

jobs:
release:
name: Release to GitHub
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/cache@v2
id: cache-rustup
with:
path: ~/.cache/rustup/
key: ${{ runner.os }}-rustup
- name: rustup
run: |
rustup toolchain install stable
rustup target add wasm32-unknown-unknown
rustup component add rustfmt
- name: Build v86
run: make build/libv86.js build/v86.wasm build/v86-fallback.wasm

- name: Release to GitHub
uses: marvinpinto/action-automatic-releases@latest
with:
title: Latest Release
automatic_release_tag: latest
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
build/*.js
build/*.js.map
build/*.wasm
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
*.swp
*.swo
tests/qemu/test-i386
tests/jit-paging/test-jit
*.map
build/
closure-compiler/
images/
*.bak
*.orig
*.wasm
*.o
*.bin
*.img
*.fixture
*.fuse_hidden*
*.DS_Store
node_modules/
Cargo.lock
build-head
src/rust/gen/interpreter.rs
src/rust/gen/interpreter0f.rs
src/rust/gen/analyzer.rs
src/rust/gen/analyzer0f.rs
src/rust/gen/jit.rs
src/rust/gen/jit0f.rs
bios/seabios
25 changes: 25 additions & 0 deletions .jshint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"esversion": 8,
"globalstrict": true,
"sub": true,
"expr": true,
"-W058": true,
"-W080": true,
"-W082": true,
"-W079": true,
"-W117": true,
"-W054": true,
"-W027": true,
"-W040": true,
"-W087": true,
"-W008": true,
"loopfunc": true,
"shadow": true,
"funcscope": true,
"globals": {
"Blob": false,
"alert": false,
"console": false
},
"browser": true
}
9 changes: 9 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use_field_init_shorthand = true
match_block_trailing_comma = true
fn_single_line = true
imports_indent = "Block"
control_brace_style = "ClosingNextLine"
single_line_if_else_max_width = 92
ignore = [
"src/rust/gen"
]
29 changes: 29 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "v86"
version = "0.1.0"
publish = false

[features]
default = []
profiler = []

[lib]
crate-type = ["cdylib"]
path = "src/rust/lib.rs"

[profile.test]
lto = false
opt-level = 2
overflow-checks = false

[profile.dev]
lto = false
opt-level = 2
panic = "abort"
overflow-checks = false

[profile.release]
lto = true
opt-level = 3
incremental = false
panic = "abort"
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2012, The v86 contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit c8d2615

Please sign in to comment.