Skip to content

Commit

Permalink
ci: build kaleidoscope in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuschen authored and TheDan64 committed Jan 27, 2024
1 parent 0b13d10 commit f5f39bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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

0 comments on commit f5f39bf

Please sign in to comment.