Skip to content

Conversation

@katyo
Copy link
Contributor

@katyo katyo commented Mar 23, 2021

Solution for #73

Implemented tasks:

  • Check code formatting rules
  • Check code quality using clippy
  • Generate bindings for supported platforms (stable Rust)
  • Check building on all supported platforms (stable Rust)
  • Check building on different Rust channels (stable/beta/nightly, Linux x86_64)
  • Run tests on native Linux platforms (x86_64 and i686)
  • Create pull-requests for updating generated bindings
  • Publish crates when pushing version tag (It requires explicitly setting versions in manifests of crates)

All tasks runs on ubuntu 20.04.
System version of DRM headers is used, so bindings may lack some bleeding edge APIs.
To get publishing working you need set CRATES_TOKEN secret.

Currently supported platforms for bindgen:

  • Linux x86
  • Linux x86_64
  • Linux arm
  • Linux aarch64

Needed for gbm.rs#4

@katyo katyo force-pushed the develop-ci branch 11 times, most recently from 8783b98 to e452972 Compare March 28, 2021 17:27
@katyo
Copy link
Contributor Author

katyo commented Mar 31, 2021

@Drakulix,
I would like to assign concrete version numbers to dependencies for some reasons.
I done it on another CI branch to get working check with -Z minimal-versions.

@Drakulix
Copy link
Member

Drakulix commented Apr 1, 2021

@Drakulix,
I would like to assign concrete version numbers to dependencies for some reasons.
I done it on another CI branch to get working check with -Z minimal-versions.

I have filled #77

@katyo katyo force-pushed the develop-ci branch 5 times, most recently from 148792b to 0190362 Compare April 2, 2021 13:27
@katyo
Copy link
Contributor Author

katyo commented Apr 2, 2021

@Drakulix I have rebased this PR.
Is any more which should be done before merging?

@Drakulix
Copy link
Member

Drakulix commented Apr 2, 2021

@Drakulix I have rebased this PR.
Is any more which should be done before merging?

I do not think so.

@Slabity anything you would like to add?

@Drakulix Drakulix requested a review from Slabity April 3, 2021 11:28
@Drakulix
Copy link
Member

Drakulix commented Apr 8, 2021

@katyo Could you rebase one more time?

@Slabity I would merge this, setup the auto-publish feature for this repo and then release 0.4. Any objections?

@Slabity
Copy link
Collaborator

Slabity commented Apr 8, 2021

@Slabity I would merge this, setup the auto-publish feature for this repo and then release 0.4. Any objections?

No objections at all. Having proper CI and auto-publishing is probably a good idea.

@katyo
Copy link
Contributor Author

katyo commented Apr 9, 2021

@Drakulix @Slabity Hope it's ready to merge.

Don't forget to add CRATES_TOKEN secret before publising on crates.io via tags.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Looks good!
Two last questions, through...

@Slabity can you setup the CRATES_TOKEN secret?
Alternatively I can do it, if you give me push access to drm-sys as well, otherwise the upload will fail.

with:
toolchain: stable
override: true
- name: Publish crates
Copy link
Member

Choose a reason for hiding this comment

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

Can this step deal with the three different packages of the repository?
Or do we need multiple steps here?

The order is important as well, since the crates depend on each other.
We need to push drm-sys first, then drm-ffi and at last drm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This step uses publish-crates action which supports publishing workspace members with dependencies.
It works for my projects just a fine. I hope it will also works here.

@Drakulix Drakulix changed the title [WIP] Add CI Add CI Apr 9, 2021
@Drakulix Drakulix merged commit cc83dc0 into Smithay:develop Apr 10, 2021
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features
Copy link
Contributor

Choose a reason for hiding this comment

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

@katyo You might want to expand this with --all-targets so that the examples are linted, too.

In other news something odd is going on with the clippy on nightly. The current 1.51 stable gives off extra upper_case_acronyms warnings in src/lib.rs, and tons of redundant_field_names warnings, but nightly doesn't. Is this a temporary fluke or do we need extra configuration? Have you seen this on other projects?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, these crates are not in a workspace :)

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.

4 participants