-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WORKFLOWS] adding test workflow using ytest + [FIX] fixing [BUG] Doc…
…umentation workflow fails when there are warnings #13
- Loading branch information
Showing
4 changed files
with
54 additions
and
1 deletion.
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
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
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,30 @@ | ||
name: Run ir tests | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
ytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
run: | | ||
rustup update --no-self-update stable | ||
- name: Build | ||
run: cargo build --all | ||
|
||
- name: Run tests | ||
run: | | ||
for file in $(find tests -type f -name "*.yl"); do | ||
echo "Processing $file" | ||
cargo run -p ytest -- -t="$file" | ||
done |
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,18 @@ | ||
# RUN: | ||
cargo run -p ylc -- -in=%s -o=out.o | ||
gcc out.o -o a.exe | ||
./a.exe | ||
# IN: | ||
const const0 = "Hello World!\n\00" | ||
|
||
define void @main() { | ||
entry: | ||
%0 = ptr const0 | ||
%1 = call void printf ptr %0 | ||
ret void 0 | ||
|
||
} | ||
declare void @printf( ptr %0, ... ) | ||
|
||
# STDOUT: | ||
Hello World! |