Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rust.yml #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Create rust.yml #2

wants to merge 2 commits into from

Conversation

Swoorup
Copy link
Owner

@Swoorup Swoorup commented Feb 19, 2024

Stabilization is not that far of: rust-lang/rust#106655 (comment)
Probably hold this off until then...

@Swoorup
Copy link
Owner Author

Swoorup commented May 23, 2024

@gooroo-dev review

Copy link

gooroo-dev bot commented May 23, 2024

It looks like the git PR diff content was not included in your request. Please provide the diff or the relevant code changes so that I can review them and provide the required feedback.

Yours, Gooroo.dev

@oleksandr-vonahi
Copy link

@gooroo-dev review

Copy link

gooroo-dev bot commented May 23, 2024

No known files to review.

@oleksandr-vonahi
Copy link

@gooroo-dev review

Copy link

gooroo-dev bot commented May 23, 2024

I couldn't find any files for me to review. At this moment, I support these file extensions: .js, .jsx, .ts, .coffee, .rb, .cpp, .cc, .cxx, .c, .h, .hpp, .py, .php, .java, .go, .cs, .kt, .kts, .swift, .css, .scss, .sass, .erb, .less, .sass, .rs, .kts.

@oleksandr-vonahi
Copy link

@gooroo-dev review anyway

Copy link

gooroo-dev bot commented May 23, 2024

I couldn't find any files for me to review. At this moment, I support these file extensions: .js, .jsx, .ts, .coffee, .rb, .cpp, .cc, .cxx, .c, .h, .hpp, .py, .php, .java, .go, .cs, .kt, .kts, .swift, .css, .scss, .sass, .erb, .less, .sass, .rs, .kts.

Copy link

gooroo-dev bot commented May 23, 2024

Summary of Changes

  • Added a new GitHub Actions workflow configuration file .github/workflows/ci.yml.
  • The workflow is named "wgsl_bindgen CI".
  • The workflow triggers on push and pull_request events to the main branch.
  • The workflow sets an environment variable CARGO_TERM_COLOR to always.
  • The workflow contains a single job named build that runs on ubuntu-latest.
  • The job has the following steps:
    • Checks out the repository using actions/checkout@v3.
    • Builds the project using cargo build --verbose.
    • Runs tests using cargo test --verbose.

Issues, Bugs, or Typos

  • No issues, bugs, or typos were found in the code or file names.

Suggestions for Improvement

  1. Cache Dependencies: To speed up the build process, you can cache the Cargo dependencies. This can be done by adding a step to cache the Cargo registry and build artifacts:

    - name: Cache Cargo registry
      uses: actions/cache@v2
      with:
        path: ~/.cargo/registry
        key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-registry-
    
    - name: Cache Cargo build
      uses: actions/cache@v2
      with:
        path: target
        key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-build-
  2. Add Linting: It's a good practice to add a linting step to ensure code quality. You can use cargo clippy for this purpose:

    - name: Run linter
      run: cargo clippy --all-targets --all-features -- -D warnings
  3. Separate Build and Test Jobs: For better organization and potential parallelism, you can separate the build and test steps into different jobs:

    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v3
        - name: Cache Cargo registry
          uses: actions/cache@v2
          with:
            path: ~/.cargo/registry
            key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
            restore-keys: |
              ${{ runner.os }}-cargo-registry-
        - name: Cache Cargo build
          uses: actions/cache@v2
          with:
            path: target
            key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
            restore-keys: |
              ${{ runner.os }}-cargo-build-
        - name: Build
          run: cargo build --verbose
    
      test:
        runs-on: ubuntu-latest
        needs: build
        steps:
        - uses: actions/checkout@v3
        - name: Run tests
          run: cargo test --verbose

These improvements can help optimize the CI process and ensure better code quality.

Yours, Gooroo.dev

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.

None yet

3 participants