Add docs for C and C++ to the website (#183) #432
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
formatting: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: cargo fmt --check | |
cargo-deny: | |
name: cargo-deny | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check bans licenses sources | |
build_and_test_x86_mac: | |
name: Native Build x86_64-apple-darwin | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: rustup default stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: pip3 install toml maturin==0.14.13 | |
- run: python3 ci/build.py --target x86_64-apple-darwin | |
- name: Upload `carton_logs` on failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tmp_carton_logs | |
path: /tmp/carton_logs | |
build_wasi: | |
name: WASM Build wasm32-wasi | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: rustup target add wasm32-wasi | |
- run: cargo build -p carton --verbose --target wasm32-wasi | |
build_wasm: | |
name: WASM Build wasm32-unknown-unknown | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: rustup target add wasm32-unknown-unknown | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm install -g wasm-pack [email protected] | |
- run: > | |
cd source/carton-bindings-wasm && ./build.sh && | |
cd tests && yarn install && node basic.js |