Skip to content

Conversation

@joncinque
Copy link
Contributor

Problem

The semver job is failing during publish because the CLI package has no lib target.

Summary of changes

I went through a few iterations on this, including a complicated cargo metadata | jq command to see if there were any lib targets on the crate, and then decided it would be easier to just not run the job for the cli package.

And then while doing that, I found out that there's no way to easily say:

  • don't run a set of steps
  • still mark the job as successful for later jobs that require it to be successful

So I added the "if" line to a bunch of steps in the semver job.

I remember you did something similar for another repo, but I couldn't find the eventual solution. Let me know what you think!

#### Problem

The semver job is failing during publish because the CLI package has no
lib target.

#### Summary of changes

I went through a few iterations on this, including a complicated cargo
metadata | jq command to see if there were any lib targets on the crate,
and then decided it would be easier to just not run the job for the cli
package.

And then while doing that, I found out that there's no way to easily
say:

* don't run a set of steps
* still mark the job as successful for later jobs that require it to be
  successful

So I added the "if" line to a bunch of steps in the semver job.
@joncinque joncinque requested a review from febo July 9, 2025 11:40
@febo
Copy link

febo commented Jul 9, 2025

I think you can disable the whole semver job, instead of individual steps. Unless you need the "checkout" and "setup environment" steps to run, but probably they are not needed.

semver:
    name: Check Semver
    runs-on: ubuntu-latest
    if: ${{ inputs.package_path != "clients/cli" }}
    steps:
      ...

@joncinque
Copy link
Contributor Author

If you do that, then I think the job is marked as "skipped", so the next job won't run

@joncinque
Copy link
Contributor Author

Unless you're sure that it isn't the case! I read a lot of issues and comments online that didn't have a solution to this

@febo
Copy link

febo commented Jul 9, 2025

Unless you're sure that it isn't the case! I read a lot of issues and comments online that didn't have a solution to this

Oh, right, forgot that "publish" depends on "semver". In this case, maybe add the same if condition to the other jobs so it does not wait for the checkout and setup environment to finish perhaps?

@joncinque
Copy link
Contributor Author

Sounds good, done!

Copy link

@febo febo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@joncinque joncinque merged commit 2f3a5fd into solana-program:main Jul 10, 2025
10 checks passed
@joncinque joncinque deleted the nosemver branch July 10, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants