-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding ci for cargo machete (#252)
* chore: adding ci for cargo machete This adds a Makefile target to use machete to check for any unused dependencies. Its possible that machete has a false positive. For those cases simply add the dependencies to the ignored list for machete in the Cargo.toml In order to make machete happy we needed to clean up the generated Cargo.toml files for the api-server and kubo-rpc-server crates. Since these updates to the toml file are now more involved we use a augtool to safely edit these files. Builders now must install augeas/augtool. * fix: do docker build natively
- Loading branch information
1 parent
25e70b3
commit e4dc833
Showing
21 changed files
with
190 additions
and
414 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,9 @@ env: | |
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
container: 'public.ecr.aws/r5b3e0r5/3box/rust-builder:latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The prefix cache key, this can be changed to start a new cache manually. | ||
|
@@ -35,17 +35,6 @@ jobs: | |
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: Install Protoc | ||
run: | | ||
PROTOC_VERSION=3.20.1 | ||
PROTOC_ARCH=linux-x86_64 | ||
PROTOC_ZIP=protoc-$PROTOC_VERSION-$PROTOC_ARCH.zip | ||
curl --retry 3 --retry-max-time 90 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | ||
rm -f $PROTOC_ZIP | ||
echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV | ||
echo "PROTOC_INCLUDE=/usr/local/include" >> $GITHUB_ENV | ||
- name: Check fmt | ||
run: make check-fmt | ||
- name: Check clippy | ||
|
@@ -54,11 +43,13 @@ jobs: | |
run: | | ||
make check-api-server | ||
make check-kubo-rpc-server | ||
- name: Check deps | ||
run: make check-deps | ||
test: | ||
runs-on: ubuntu-latest | ||
container: 'public.ecr.aws/r5b3e0r5/3box/rust-builder:latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The prefix cache key, this can be changed to start a new cache manually. | ||
|
@@ -67,17 +58,6 @@ jobs: | |
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: Install Protoc | ||
run: | | ||
PROTOC_VERSION=3.20.1 | ||
PROTOC_ARCH=linux-x86_64 | ||
PROTOC_ZIP=protoc-$PROTOC_VERSION-$PROTOC_ARCH.zip | ||
curl --retry 3 --retry-max-time 90 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | ||
rm -f $PROTOC_ZIP | ||
echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV | ||
echo "PROTOC_INCLUDE=/usr/local/include" >> $GITHUB_ENV | ||
- name: Run tests | ||
run: make test | ||
build: | ||
|
@@ -86,7 +66,6 @@ jobs: | |
build_tag: ${{ steps.build.outputs.build_tag }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# The prefix cache key, this can be changed to start a new cache manually. | ||
|
@@ -95,19 +74,6 @@ jobs: | |
# Cache only the cargo registry | ||
cache-targets: false | ||
- uses: mozilla-actions/[email protected] | ||
- name: Install Protoc | ||
run: | | ||
PROTOC_VERSION=3.20.1 | ||
PROTOC_ARCH=linux-x86_64 | ||
PROTOC_ZIP=protoc-$PROTOC_VERSION-$PROTOC_ARCH.zip | ||
curl --retry 3 --retry-max-time 90 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | ||
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | ||
rm -f $PROTOC_ZIP | ||
echo "PROTOC=/usr/local/bin/protoc" >> $GITHUB_ENV | ||
echo "PROTOC_INCLUDE=/usr/local/include" >> $GITHUB_ENV | ||
- name: Build | ||
run: make build | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
Oops, something went wrong.