Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: build kaleidoscope in ci and revise example docs #466

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
run: cargo build --release --features llvm${{ matrix.llvm-version[1] }} --verbose
- name: Run tests
run: cargo test --release --features llvm${{ matrix.llvm-version[1] }} --verbose
- name: Build example
run: cargo build --example kaleidoscope --features llvm${{ matrix.llvm-version[1] }} --verbose
doc:
name: Documentation
runs-on: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion examples/kaleidoscope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
This example shows how one can implement the [Kaleidoscope programming language](https://llvm.org/docs/tutorial/index.html) using Inkwell.
It implements every feature up to the [7th chapter](https://llvm.org/docs/tutorial/LangImpl07.html).

When running this example (using the `cargo run --example kaleidoscope` command), a prompt will be displayed; for example:
The [usage](../../README.md#usage) part doesn't fit the example as it shares the same `Cargo.toml` file with the whole project.

To run the example, the LLVM version is required:
```sh
cargo run --example kaleidoscope --features llvm$(llvm-config --version | sed 's/\./-/;s/\.[0-9]*//')
```

When running this command, a prompt will be displayed; for example:

```
?> 1 + 1
Expand Down