Skip to content

Add CI test for crates.io setup and testing - #49

Open
bratpiorka wants to merge 1 commit into
oneapi-src:mainfrom
bratpiorka:rrudnick_crate_test
Open

bratpiorka wants to merge 1 commit into
oneapi-src:mainfrom
bratpiorka:rrudnick_crate_test

Conversation

@bratpiorka

Copy link
Copy Markdown
Contributor

Add CI test for crates.io setup and testing

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review comments remain.

Pull request overview

Adds a GitHub Actions workflow to validate installing and running sycl-rs from crates.io with oneAPI.

Changes:

  • Configures oneAPI on the self-hosted runner.
  • Creates a temporary Cargo project using sycl-rs 0.1.0.
  • Builds and runs a SYCL platform smoke test.
File summaries
File Description
.github/workflows/crates-io.yml Adds crates.io installation, build, and runtime validation.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@szymon-zadworny szymon-zadworny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This check runs on each PR, but it doesn't actually check the pull request - it only checks the most recently published sycl-rs version.

Comment thread .github/workflows/crates-io.yml Outdated

env:
CARGO_TERM_COLOR: always
SYCL_RS_VERSION: 0.1.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This parameter has to be updated on each version change.

Comment thread .github/workflows/crates-io.yml Outdated
run: |
cargo init --bin "$RUNNER_TEMP/crates-io-test"
cd "$RUNNER_TEMP/crates-io-test"
cargo add "sycl-rs@$SYCL_RS_VERSION"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is downloading the crate from a public repository (crates.io). This CI check doesn't actually validate new pull requests - in only checks a past version published on crates.io.

We should either set the dependency as a git repository or use source replacement. We need to make sure our library compiles with standard Rust tooling as part of another project, but from that point of view it doesn't really matter whether we download our sources from crates.io or from another mirror.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical security and dependency-resolution issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite


jobs:
build-and-test:
runs-on: ["oneapi-rs", "Linux"]

steps:
- name: Checkout repository
uses: actions/checkout@v4
Comment on lines +61 to +63
mkdir .cargo
cp "$RUNNER_TEMP/vendor-config.toml" .cargo/config.toml
cargo add sycl-rs
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.

3 participants