docs: clean up slop accidentally added to README #366
This file contains hidden or 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: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-main: | |
| strategy: | |
| matrix: | |
| featureset: | |
| - flag: "" | |
| - flag: "--all-features" | |
| - flag: "--no-default-features" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Build lib | |
| run: | | |
| cargo --version | |
| cargo build --verbose ${{ matrix.featureset.flag }} | |
| - name: Build bin | |
| if: matrix.featureset.flag == '' | |
| run: | | |
| cargo build --features bin-build --bin zhconv --verbose | |
| - name: Test | |
| run: | | |
| cargo test --workspace ${{ matrix.featureset.flag }} --verbose | |
| - name: Check Format | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets ${{ matrix.featureset.flag }} -- -D warnings | |
| build-pyo3: | |
| needs: build-main | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Symlink README | |
| run: | | |
| cd pyo3/ | |
| ln -s ../README.md ./ | |
| - uses: messense/maturin-action@v1 | |
| with: | |
| manylinux: auto | |
| command: build | |
| args: --release --sdist -o pyo3/dist --find-interpreter -m pyo3/Cargo.toml | |
| build-typst: | |
| needs: build-main | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: typst/ | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Wasm target for Rust | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Install Typst | |
| run: | | |
| curl -fsSL -O https://github.com/typst/typst/releases/download/v0.14.0/typst-x86_64-unknown-linux-musl.tar.xz | |
| tar xf typst-x86_64-unknown-linux-musl.tar.xz | |
| mv typst-x86_64-unknown-linux-musl/typst /home/runner/ | |
| working-directory: /tmp | |
| - name: Build | |
| run: | | |
| cargo --version | |
| cargo build --release --verbose --target wasm32-unknown-unknown | |
| - name: Typst Compile | |
| run: | | |
| cp target/wasm32-unknown-unknown/release/zhconv_typst.wasm ./ | |
| /home/runner/typst --version | |
| /home/runner/typst compile example.typ | |
| - name: Clippy | |
| run: cargo clippy --target wasm32-unknown-unknown --all-features -- -D warnings | |
| - name: Check Format | |
| run: cargo fmt -- --check | |
| # now Pages.dev do this for us | |
| # build-web: | |
| # needs: build-main | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v2 | |
| # - uses: actions/setup-node@v1 | |
| # with: | |
| # node-version: "16" | |
| # - name: Init web | |
| # working-directory: web/ | |
| # run: | | |
| # node --version | |
| # yarn --version | |
| # yarn install | |
| # - name: Build | |
| # working-directory: web/ | |
| # run: yarn build | |
| # - name: Test | |
| # working-directory: web/ | |
| # run: yarn test # no effective test so far | |
| # adapted from: https://github.com/Gowee/cidr-aggregator/blob/9c02241ab64e5cf62e33375e55e09502385bdc61/.github/workflows/main.yml#L1 | |
| # which is in turn adapted from: | |
| # https://github.com/Gowee/json2pyi/blob/4e13b4767f97d79e90ecf19a0cb21b1e799d7d48/.github/workflows/main.yml |