File tree Expand file tree Collapse file tree 2 files changed +49
-27
lines changed Expand file tree Collapse file tree 2 files changed +49
-27
lines changed Original file line number Diff line number Diff line change 11name : Rust CI
22
3+ # TODO: The paths need to include all rust projects. Those exist outside the rust directory.
4+
35on :
46 workflow_dispatch :
57 push :
1012 - ' rust/**'
1113
1214jobs :
13- # Check that code compiles and tests pass
14- test :
15- # The testing environment is used to access the BN_SERIAL secret.
16- environment : testing
17- name : cargo test
18- runs-on : ubuntu-latest
19- steps :
20- - uses : actions/checkout@v4
21- # We need to add wayland as it's used for file picker in the WARP integration
22- - name : Install system dependencies
23- run : sudo apt-get install libwayland-dev
24- # Pull in Binary Ninja
25- - name : Setup Binary Ninja
26- id : setup-binja
27- uses : Vector35/setup-binary-ninja@v1-beta
28- with :
29- license : ' ${{ secrets.BN_SERIAL }}'
30- python-support : ' false'
31- dev-branch : ' true'
32- - uses : actions-rust-lang/setup-rust-toolchain@v1
33- - name : Test
34- # For now, we run the tests single threaded, there are some data races in core around platform types
35- run : cargo test --all-features -- --test-threads=1
36- env :
37- BINARYNINJADIR : ${{ steps.setup-binja.outputs.install-path }}
38- BN_LICENSE : ${{ secrets.BN_LICENSE }}
39-
4015 # Check lints with clippy
4116 clippy :
4217 name : cargo clippy
Original file line number Diff line number Diff line change 1+ name : Rust Testing
2+
3+ # This workflow will have access to two secrets, `BN_SERIAL` and `BN_LICENSE`, they are exposed only for the test job
4+ # and only if workflow has been approved to run. If there is no approval they workflow won't run.
5+ # What security issues arise from this? If a person makes a PR that leaks the `BN_SERIAL` or `BN_LICENSE` and a maintainer
6+ # approves it than the those secrets would leak.
7+
8+ on :
9+ workflow_dispatch :
10+ push :
11+ paths :
12+ - ' rust/**'
13+ # Pull request target allows us to use the bn license and serial for PR's
14+ # to insure we do not leak the license the workflow is required to be approved manually.
15+ pull_request_target :
16+ paths :
17+ - ' rust/**'
18+
19+ jobs :
20+ # Check that code compiles and tests pass
21+ test :
22+ # Using the testing environment gives us the needed secrets, it also requires a maintainer to approve it to run.
23+ environment : testing
24+ name : cargo test
25+ runs-on : ubuntu-latest
26+ permissions :
27+ issues : read
28+ steps :
29+ - uses : actions/checkout@v4
30+ # We need to add wayland as it's used for file picker in the WARP integration
31+ - name : Install system dependencies
32+ run : sudo apt-get install libwayland-dev
33+ # Pull in Binary Ninja
34+ - name : Setup Binary Ninja
35+ id : setup-binja
36+ uses : Vector35/setup-binary-ninja@v1-beta
37+ with :
38+ license : ' ${{ secrets.BN_SERIAL }}'
39+ python-support : ' false'
40+ dev-branch : ' true'
41+ - uses : actions-rust-lang/setup-rust-toolchain@v1
42+ - name : Test
43+ # For now, we run the tests single threaded, there are some data races in core around platform types
44+ run : cargo test --all-features -- --test-threads=1
45+ env :
46+ BINARYNINJADIR : ${{ steps.setup-binja.outputs.install-path }}
47+ BN_LICENSE : ${{ secrets.BN_LICENSE }}
You can’t perform that action at this time.
0 commit comments