Skip to content

Implement cargo related shared workflows #54

Description

@dpal

At the moment of writing, cargo is used in the following workflows:

https://github.com/enarx/mmledger/tree/main/.github/workflows/coverage.yml:

      - name: Install cargo-llvm-cov
          curl -LsSf 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.2/cargo-llvm-cov-x86_64-unknown-linux-musl.tar.gz'
          && mv cargo-llvm-cov $HOME/.cargo/bin
      - name: Run cargo-llvm-cov
        run: cargo llvm-cov --lcov --output-path lcov.info

https://github.com/enarx/mmledger/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1

https://github.com/enarx/mmledger/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/vfs/tree/main/.github/workflows/build.yml:

    - run: cargo update

https://github.com/enarx/vfs/tree/main/.github/workflows/check.yml:

    - run: cargo update

https://github.com/enarx/rcrt1/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1

https://github.com/enarx/rcrt1/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/vdso/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/vdso/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/testaso/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/testaso/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/ciborium/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cd ciborium-io && cargo readme > README.md
      - run: cd ciborium-ll && cargo readme > README.md
      - run: cd ciborium && cargo readme > README.md

https://github.com/enarx/ciborium/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/crt0stack/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/crt0stack/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/flagset/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1

https://github.com/enarx/flagset/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/iocuddle/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/iocuddle/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/lset/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/lset/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/mmarinus/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/mmarinus/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/nbytes/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/nbytes/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/noted/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1

https://github.com/enarx/noted/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/primordial/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/primordial/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/sgx/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/sgx/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1
      - uses: actions-rs/cargo@v1

https://github.com/enarx/xsave/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - uses: actions-rs/cargo@v1
    name: cargo clippy
      - uses: actions-rs/cargo@v1
    name: cargo readme
      - run: cargo install cargo-readme
      - run: cargo readme > README.md && git diff --exit-code

https://github.com/enarx/xsave/tree/main/.github/workflows/test.yml:

      - uses: actions-rs/cargo@v1

https://github.com/enarx/enarx/tree/main/.github/workflows/cargo-update.yml:

name: cargo-update
          ref: chore/cargo-update
          for i in $(find . -name Cargo.toml); do cargo update --manifest-path=$i; done
          git diff --quiet && git diff --staged --quiet || git commit -am 'chore(deps): cargo update to update dependencies' && \
            git push --force origin chore/cargo-update && echo "updated=0" >>$GITHUB_OUTPUT
          gh pr create -B main -b "chore(deps): cargo update to update dependencies" \
                               -t "chore(deps): cargo update to update dependencies" -l dependencies

https://github.com/enarx/enarx/tree/main/.github/workflows/coverage.yml:

        run: rm -fr * $HOME/.cargo $HOME/.rustup
      - name: Install cargo-llvm-cov
          curl -LsSf 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.3/cargo-llvm-cov-x86_64-unknown-linux-musl.tar.gz'
          && mv cargo-llvm-cov $HOME/.cargo/bin
      - name: Run cargo-llvm-cov
        run: cargo llvm-cov --coverage-target-only --target x86_64-unknown-linux-gnu --workspace --lcov --output-path lcov.info ${{ matrix.crate.flags }}

https://github.com/enarx/enarx/tree/main/.github/workflows/lint.yml:

    name: cargo fmt
      - run: cargo fmt --all -- --check
    name: cargo clippy (${{ matrix.args }})
      - run: cargo clippy ${{ matrix.args }} -- -D warnings
      - run: cargo clippy ${{ matrix.args }} --all-features -- -D warnings
    name: cargo deny
      - uses: EmbarkStudios/cargo-deny-action@v1

https://github.com/enarx/enarx/tree/main/.github/workflows/nix.yml:

    - '.cargo/**'
    - '.cargo/**'
    - run: nix develop -L --ignore-environment -c cargo test 'wasm::'

https://github.com/enarx/enarx/tree/main/.github/workflows/release.yml:

      - run: cargo build --release
      - name: Add cargo-wix subcommand
        run: cargo install cargo-wix --version 0.3.3
        run: cargo wix --no-build -p enarx --nocapture -I release\windows\main.wxs --output target\wix\enarx-x86_64-windows.msi
      run: echo "version=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "enarx") | .version' --raw-output)" >>$GITHUB_OUTPUT
      run: echo "version=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "enarx") | .version' --raw-output)" >>$GITHUB_OUTPUT
      run: echo "version=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "enarx") | .version' --raw-output)" >>$GITHUB_OUTPUT

https://github.com/enarx/enarx/tree/main/.github/workflows/sbom_manifest_action.yml:

    name: Run cargo-cyclonedx and generate BOM files [both JSON and XML]
      - name: Install cargo-cyclonedx
        run: cargo install cargo-cyclonedx
        run: cargo cyclonedx --all --format=json
        run: cargo cyclonedx --all --format=xml

https://github.com/enarx/enarx/tree/main/.github/workflows/test.yml:

        run: rm -fr * $HOME/.cargo $HOME/.rustup
      - run: cargo test ${{ matrix.profile.flag }}
      - run: cargo build ${{ matrix.profile.flag }}
      - run: cargo test --workspace
      - run: cargo test --workspace
      - run: cargo test ${{ matrix.profile.flag }} --workspace --target x86_64-unknown-linux-gnu
      - name: cargo miri setup
        run: cargo miri setup --manifest-path ${{ matrix.crate.path }}/Cargo.toml
      - name: cargo miri test
        run: cargo miri test --manifest-path ${{ matrix.crate.path }}/Cargo.toml

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Standby (next sprint)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions