forked from HigherOrderCO/HVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:kindelia/hvm
- Loading branch information
Showing
24 changed files
with
2,853 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Cargo | ||
on: | ||
workflow_call: | ||
jobs: | ||
cargo_check: | ||
name: 👁️🗨️ Cargo Check | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
|
||
cargo_test: | ||
name: 🧪 Cargo Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
cargo_fmt: | ||
name: 💅 Cargo Fmt | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
cargo_clippy: | ||
name: 👃 Cargo Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,15 @@ | ||
name: CI | ||
on: | ||
push: | ||
pull_request: | ||
types: [opened, review_requested, ready_for_review] | ||
|
||
name: Continuous Integration | ||
|
||
jobs: | ||
cargo_check: | ||
if: github.event.pull_request.draft == false | ||
name: cargo check | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
|
||
cargo_test: | ||
if: github.event.pull_request.draft == false | ||
name: cargo test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
cargo_fmt: | ||
if: github.event.pull_request.draft == false | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
cargo_clippy: | ||
if: github.event.pull_request.draft == false | ||
name: cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
|
||
nix_build: | ||
if: github.event.pull_request.draft == false | ||
name: nix build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v15 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- run: nix build | ||
|
||
nix_flake_check: | ||
if: github.event.pull_request.draft == false | ||
name: nix flake check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v15 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- run: nix build -f . checks.x86_64-linux | ||
cargo: | ||
if: github.event.pull_request.draft == false | ||
uses: ./.github/workflows/cargo.yml | ||
tests: | ||
needs: [cargo] | ||
uses: ./.github/workflows/tests.yml | ||
nix: | ||
needs: [cargo] | ||
uses: ./.github/workflows/nix.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Nix | ||
on: | ||
workflow_call: | ||
jobs: | ||
nix_build: | ||
name: 🔨 Nix Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v15 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- run: nix build | ||
|
||
nix_flake_check: | ||
name: ❄️ Nix Flake Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v15 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- run: nix build -f . checks.x86_64-linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Tests | ||
on: | ||
workflow_call: | ||
jobs: | ||
hvm-tests: | ||
name: 🔎 HVM Tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
run_mode: [interpreted, compiled, single-thread] | ||
exclude: | ||
- os: windows-latest | ||
run_mode: compiled | ||
- os: windows-latest | ||
run_mode: single-thread | ||
env: | ||
# Add .exe suffix to HVM command on Windows | ||
HVM_CMD: ${{matrix.os != 'windows-latest' && './target/release/hvm' || './target/release/hvm.exe'}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- run: cargo build --release | ||
# FIXME: compiled mode of kind 2 teste don't work because compiled | ||
# code don't have sugar for strings | ||
- run: python3 -X utf8 tests/test_cli.py --hvm-cmd ${{env.HVM_CMD}} | ||
--run-mode ${{ matrix.run_mode }} --skip-test kind2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
*.o | ||
*.tmp | ||
*.out | ||
|
||
tests/**/*.c | ||
~* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.