Bump syn from 2.0.39 to 2.0.43 #890
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: Rust | |
on: | |
push: | |
branches: [main, "*.x"] | |
pull_request: | |
release: | |
types: [created] | |
env: | |
RUST_BACKTRACE: "1" | |
RUST_LOG: "info" | |
# speed up build by using clang/lld | |
CC: "clang-14" | |
CXX: "clang++-14" | |
LD: "clang-14" | |
LDFLAGS: "-fuse-ld=lld-14" | |
RUSTFLAGS: "-C linker=clang-14 -C link-arg=-fuse-ld=lld-14" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- toolchain: "stable" | |
- toolchain: "nightly" | |
name: "Test (Rust ${{matrix.rust.toolchain}})" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: "${{matrix.rust.toolchain}}" | |
id: "rust-toolchain" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/git | |
~/.cargo/registry | |
target | |
key: "${{runner.os}} Rust ${{steps.rust-toolchain.outputs.cachekey}}" | |
- run: cargo test | |
- name: cargo run | |
run: | | |
cargo run -- --bin | |
git diff --exit-code README.md | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: ./rustfmt.sh --check | |
docker: | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log In at ghcr.io | |
run: echo "${{secrets.GITHUB_TOKEN}}" | docker login ghcr.io -u msrd0 --password-stdin | |
- name: Build and Push image to ghcr.io | |
run: | | |
image="ghcr.io/msrd0/cargo-doc2readme" | |
tag="$image:$(git describe --tags)" | |
echo "==> Building docker image" | |
docker build . --pull --tag "$image" | |
docker tag "$image" "$tag" | |
echo "==> Pushing docker image" | |
docker push "$tag" | |
docker push "$image" |