Repository navigation
Add experimental on-printer HID erase-fix installer (review of #19) #26
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
Open
phryneas
wants to merge
4
commits into
main
Choose a base branch
from
feat/on-printer-hid-fix-review
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
58eb6c9
Restore on-printer HID installer for review
phryneas c6c5932
Rewrite on-printer guide around installation and correct reboot advice
phryneas 9652053
Clarify version availability, result reporting and 30D detection
phryneas faf9343
Warn before identification can lead to an extra camera boot
phryneas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: On-printer HID tool | ||
| on: | ||
| push: | ||
| pull_request: | ||
| workflow_call: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: '3.12' | ||
| - name: Check embedded canonical payload and shell contracts | ||
| run: | | ||
| python on-printer/generate_payload.py --check | ||
| python -m unittest discover -s tests -p test_on_printer.py -v | ||
| sh -n on-printer/payload/installer.sh | ||
| - name: Install native build tools | ||
| run: | | ||
| rustup toolchain install 1.85.1 --profile minimal --component clippy --target armv7-unknown-linux-musleabihf | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-arm-linux-gnueabihf qemu-user | ||
| - name: Test native protocol and compile static ARMv7 binary | ||
| env: | ||
| CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER: arm-linux-gnueabihf-gcc | ||
| CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_RUNNER: qemu-arm | ||
| run: | | ||
| cargo +1.85.1 test --locked --manifest-path on-printer/Cargo.toml | ||
| cargo +1.85.1 clippy --locked --manifest-path on-printer/Cargo.toml --all-targets -- -D warnings | ||
| cargo +1.85.1 test --locked --manifest-path on-printer/Cargo.toml --target armv7-unknown-linux-musleabihf | ||
| cargo +1.85.1 build --locked --manifest-path on-printer/Cargo.toml --release --target armv7-unknown-linux-musleabihf | ||
| - name: Check static linking and smoke-test executable | ||
| run: | | ||
| mkdir -p dist | ||
| cp on-printer/target/armv7-unknown-linux-musleabihf/release/cc2camera-hid dist/cc2camera-hid-armv7-linux | ||
| file dist/cc2camera-hid-armv7-linux | ||
| if readelf -l dist/cc2camera-hid-armv7-linux | grep -q INTERP; then exit 1; fi | ||
| if readelf -d dist/cc2camera-hid-armv7-linux | grep -q NEEDED; then exit 1; fi | ||
| qemu-arm dist/cc2camera-hid-armv7-linux --help | ||
| if qemu-arm dist/cc2camera-hid-armv7-linux install; then exit 1; fi | ||
| cd dist | ||
| sha256sum cc2camera-hid-armv7-linux > cc2camera-hid-armv7-linux.sha256 | ||
| wc -c cc2camera-hid-armv7-linux | ||
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: cc2camera-hid-armv7-linux | ||
| path: | | ||
| dist/cc2camera-hid-armv7-linux | ||
| dist/cc2camera-hid-armv7-linux.sha256 | ||
| if-no-files-found: error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,6 @@ Thumbs.db | |
| *.swp | ||
| *~ | ||
| *.spec | ||
|
|
||
| # Native on-printer builds | ||
| on-printer/target/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THEN DON'T WASTE A SENTENCE IN THE MAIN README ON THAT