Skip to content

Commit

Permalink
ci: undo cargo package ci task (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyRosenblum authored Dec 8, 2023
1 parent 25b2587 commit ba3ff8f
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
msrv: ${{ steps.definitions.outputs.msrv }}
examples: ${{ steps.definitions.outputs.examples }}
crates: ${{ steps.definitions.outputs.crates }}
new-release: ${{ steps.definitions.outputs.new-release }}
steps:
- uses: actions/checkout@v4
# examples is populated by
Expand All @@ -64,12 +63,9 @@ jobs:
export EXAMPLES=$(find examples/ -maxdepth 1 -mindepth 1 -type d | jq -R | jq -sc)
echo "examples=$EXAMPLES"
echo "examples=$EXAMPLES" >> $GITHUB_OUTPUT
export CRATES=$(cargo metadata --no-deps --format-version 1 | jq --arg PWD "$PWD/" '.packages[] | select(.publish == null).manifest_path | sub($PWD; "")' | jq -s | jq '. += ["tools/xdp/s2n-quic-xdp/Cargo.toml"]' | jq -c)
export CRATES=$(find quic common -name *Cargo.toml | jq -R | jq -s | jq '. += ["tools/xdp/s2n-quic-xdp/Cargo.toml"]' | jq -c)
echo "crates=$CRATES"
echo "crates=$CRATES" >> $GITHUB_OUTPUT
export NEW_RELEASE=$(if $(./scripts/detect-new-release); then echo "true"; else echo "false"; fi)
echo "new-release=$NEW_RELEASE"
echo "new-release=$NEW_RELEASE" >> $GITHUB_OUTPUT
rustfmt:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -394,12 +390,10 @@ jobs:
status: "success"
url: "${{ steps.s3.outputs.URL }}"

# This CI step will directly build each published crate in common/ and quic/ which is
# This CI step will directly build each crate in common/ and quic/ which is
# useful because it sidesteps the feature resolution that normally occurs in a
# workspace build. We make sure that the crates build with default features,
# otherwise release to crates.io will be blocked. If the current PR is not for a new
# release, the cargo package command is used instead of cargo build, as this more closely
# matches the verification command that cargo publish executes.
# otherwise release to crates.io will be blocked
crates:
needs: env
runs-on: ubuntu-latest
Expand All @@ -420,19 +414,11 @@ jobs:
override: true

- name: build
if: ${{ needs.env.outputs.new-release == 'true' }}
uses: actions-rs/[email protected]
with:
command: build
args: --manifest-path ${{ matrix.crate }}

- name: package
if: ${{ needs.env.outputs.new-release == 'false' }}
uses: actions-rs/[email protected]
with:
command: package
args: --manifest-path ${{ matrix.crate }}

examples:
needs: env
runs-on: ubuntu-latest
Expand Down

0 comments on commit ba3ff8f

Please sign in to comment.