Compare commits
2 commits
c798cde966
...
16aa08d1e6
| Author | SHA1 | Date | |
|---|---|---|---|
| 16aa08d1e6 | |||
| 351258444a |
5 changed files with 84 additions and 5 deletions
80
.forgejo/workflows/test.yml
Normal file
80
.forgejo/workflows/test.yml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
name: "per-push tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- synchronized
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: setup rust toolchain
|
||||
uses: msrd0/rust-toolchain@nightly
|
||||
- name: compile components
|
||||
run: |
|
||||
cargo build --lib
|
||||
cargo build --bin decomposer
|
||||
|
||||
test-frontend:
|
||||
needs: [build]
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: setup rust toolchain
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
- name: test lexer
|
||||
run: cargo test lexer
|
||||
- name: test parser
|
||||
run: cargo test parser
|
||||
|
||||
timed-decomposer-parse:
|
||||
needs: [test-frontend]
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: setup rust toolchain
|
||||
uses: msrd0/rust-toolchain@nightly
|
||||
- name: build decomposer
|
||||
run: cargo build --bin decomposer
|
||||
- name: download test scheme source
|
||||
run: curl https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/refs/heads/master/src/compiler.scm --output test.scm
|
||||
- name: time parsing of test source
|
||||
run: cargo run --bin decomposer -- -t test.scm
|
||||
|
||||
test-utility:
|
||||
needs: [build]
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: setup rust toolchain
|
||||
uses: msrd0/rust-toolchain@nightly
|
||||
- name: test number package
|
||||
run: cargo test number
|
||||
- name: test double stack data type
|
||||
run: cargo test stackstack
|
||||
- name: test hashmap data type
|
||||
run: cargo test hmap
|
||||
|
||||
test-backend:
|
||||
needs: [build]
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: setup rust toolchain
|
||||
uses: msrd0/rust-toolchain@nightly
|
||||
- name: test instruction decoding
|
||||
run: cargo test util # this is instruction decoding code
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "decomposer"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
authors = ["Ava Affine <ava@sunnypup.io>"]
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "mycelium"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
num = { version = "0.4.3", features = ["alloc"] }
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ impl Iterator for Lexer {
|
|||
}
|
||||
|
||||
let res = self.seek_next_token();
|
||||
if let Err(ref e) = res {
|
||||
if let Err(e) = &res {
|
||||
self.has_error_state = Some(e.clone());
|
||||
}
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ impl Lexer {
|
|||
}
|
||||
|
||||
if let Some(ref res) = output {
|
||||
if let Err(ref e) = res {
|
||||
if let Err(e) = &res {
|
||||
self.has_error_state = Some(e.clone());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(iter_collect_into)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(core_float_math)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue