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

Add GitHub Actions workflow for JSHooks testing source #449

Open
wants to merge 4 commits into
base: jshooks
Choose a base branch
from

Conversation

tequdev
Copy link
Collaborator

@tequdev tequdev commented Feb 25, 2025

High Level Overview of Change

  • Create a new GitHub Actions workflow for testing JSHooks sources
  • Update script(SetJSHook_wasm.h) to run can be any path
    • need to place qjsc in src/test/app.

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

- Create a new GitHub Actions workflow for testing JSHooks sources
- Update script to generate SetJSHook_wasm.h
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang-format bc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should pin a specific version of clang-format in some environment variable that be easily changed.

I noticed the other day that clang-format@19 would not work for some files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems that clang-format-10 is not provided in ubuntu-latest (ubuntu 22.04).

We can install clang-format-10 in ubuntu 20.04, but errors will occur around qjsc.

At the moment, there is no effect on SetJSHook_wasm.h, so I will leave it as it is.
If you could fix it, I would be very grateful.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I started working on extracting an action in #450

I'll make a PR to this once that's sorted we can just use that

sublimator added a commit to sublimator/xahaud that referenced this pull request Feb 27, 2025
#
# - clang-format:
# Ubuntu: $sudo apt-get install clang-format
# macOS: $brew install clang-format
Copy link
Collaborator

Choose a reason for hiding this comment

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

brew install r-lib/taps/clang-format@10

To match the CI clang-format I had to use that. 19 wasn't working in every case.

related to:
https://github.com/Xahau/xahaud/pull/449/files#r1972938606

Copy link
Collaborator

@sublimator sublimator left a comment

Choose a reason for hiding this comment

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

Other than the ggrep -> grep and gsed -> sed changes, this looks good to me. I think I'd rather leave the macos defaults as they are for other scripts?

@sublimator
Copy link
Collaborator

sublimator commented Feb 27, 2025 via email

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