enable container in gh actions #21
Workflow file for this run
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
name: Build, Test and generate Doc | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
PODMAN_RUN: podman run --rm -it -v $PWD:/work -w /work ks-rs | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: make -C container | |
- run: cargo fmt -- --check | |
- run: $PODMAN_RUN cargo build --verbose | |
- run: $PODMAN_RUN cargo test --verbose | |
- name: Generate doc | |
run: | | |
$PODMAN_RUN cargo doc --no-deps | |
echo "<meta http-equiv=\"Refresh\" content=\"0; url='llvm_kaleidoscope_rs/index.html'\"/>" > target/doc/index.html | |
- name: Upload doc to gh pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/doc |