enable container in gh actions #18
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 | |
jobs: | |
init: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: make -C container | |
build: | |
runs-on: ubuntu-latest | |
needs: init | |
steps: | |
- run: cargo fmt -- --check | |
- run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo build --verbose | |
- run: podman run --rm -it -v $PWD:/work -w /work ks-rs cargo test --verbose | |
doc: | |
runs-on: ubuntu-latest | |
needs: init | |
steps: | |
- name: Generate doc | |
run: | | |
podman run --rm -it -v $PWD:/work -w /work ks-rs 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 |