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

Change CI #96

Merged
merged 94 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 92 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
6d226be
Change CI
jgcrosta Mar 25, 2024
fd697d8
Trigger CI
jgcrosta Mar 25, 2024
e40b483
Update general rust
jgcrosta Mar 25, 2024
35f7c85
Update general and integration
jgcrosta Mar 25, 2024
1dde419
Edit general rust
jgcrosta Mar 25, 2024
fac155a
Update general rust
jgcrosta Mar 25, 2024
a7e6760
Update udeps CI error
jgcrosta Mar 25, 2024
7f86b64
Update deprecated github output
jgcrosta Mar 25, 2024
9fbd1b1
Edit udeps CI
jgcrosta Mar 25, 2024
d85550b
Update prepare-matrix
jgcrosta Mar 26, 2024
c17b583
Update integration test CI
jgcrosta Mar 26, 2024
44dda78
Update CI
jgcrosta Mar 26, 2024
15ef379
Edit CI
jgcrosta Mar 26, 2024
2cd26cf
Update CI to run based on detectors
jgcrosta Mar 26, 2024
d1ae929
Update unit test CI
jgcrosta Mar 26, 2024
1b16486
Edit CI to find by directory on tests
jgcrosta Mar 26, 2024
6c23075
Cache general rust and add setup step
jgcrosta Mar 26, 2024
e51eaa0
Fix CI
jgcrosta Mar 26, 2024
af5b3d6
Cache rustup
jgcrosta Mar 26, 2024
38766db
Update general rust
jgcrosta Mar 26, 2024
72fb62e
Cache all targets
jgcrosta Mar 26, 2024
1d30ebf
Update udeps ci
jgcrosta Mar 26, 2024
b53b2d0
Add test-cases structure validation
jgcrosta Mar 26, 2024
34b88e5
Add dependencies
jgcrosta Mar 26, 2024
fa329c4
Remove target caching due to memory constraints
jgcrosta Mar 26, 2024
f832fdf
Update udeps CI
jgcrosta Mar 26, 2024
b7ba074
Try fix exit on find
jgcrosta Mar 26, 2024
622c1fa
Use python for clippy and fmt
jgcrosta Mar 26, 2024
cde130b
Unbuffer python output
jgcrosta Mar 26, 2024
c3afb9b
Edit udeps ci
jgcrosta Mar 27, 2024
e82e50d
Test fix udeps ci
jgcrosta Mar 27, 2024
b113133
frozen -> locked on udeps ci
jgcrosta Mar 27, 2024
f7fb77b
Test udeps with macos
jgcrosta Mar 27, 2024
875f754
Remove udeps step, try fix clippy warnings, add python for tests ci
jgcrosta Mar 27, 2024
c858551
Delete unused scripts, add make ci, unbuffer python in tests
jgcrosta Mar 27, 2024
10766bf
Try to test on windows-latest
jgcrosta Mar 27, 2024
6643a54
Remove windows (not yet supported)
jgcrosta Mar 27, 2024
a45ef20
Try clean udeps ci
jgcrosta Mar 27, 2024
45aedec
Default to specific nightly
jgcrosta Mar 27, 2024
0d9b532
Use scout-audit toolchain
jgcrosta Mar 27, 2024
ddfab9f
Do not share cache with clippy
jgcrosta Mar 27, 2024
637e290
Try run udeps
jgcrosta Mar 27, 2024
868cca1
Go back to when udeps worked
jgcrosta Mar 27, 2024
56cdbfa
Cache udeps
jgcrosta Mar 27, 2024
89275b3
Try fix soroban-version udeps error
jgcrosta Mar 27, 2024
1d6b0ea
Improve comment
jgcrosta Mar 27, 2024
a7a9a0e
Try fix comment and cache individual tests
jgcrosta Mar 27, 2024
2093cf3
Try fix individual caching in tests
jgcrosta Mar 27, 2024
de86b85
Fix cache on tests
jgcrosta Mar 27, 2024
86f45ca
Try fix comment and remove individual cache, share general rust cache
jgcrosta Mar 28, 2024
4dd80b5
Find comment in general-rust, debug test detector output
jgcrosta Mar 28, 2024
250a8e5
Try fix comment
jgcrosta Mar 28, 2024
031f9b0
Try fix artifacts download
jgcrosta Mar 28, 2024
8893832
Try fix again
jgcrosta Mar 28, 2024
41b5684
Update messages and format
jgcrosta Apr 3, 2024
d911f01
Merge branch 'main' into ci-edit
jgcrosta Apr 8, 2024
58eadf5
Delete udeps and add integration tests to ci
jgcrosta Apr 8, 2024
5d90d55
Try fix test passing on invalid json output
jgcrosta Apr 8, 2024
4b77981
Delete release worfklow, add utils file
jgcrosta Apr 9, 2024
70b460d
Fix format issue
jgcrosta Apr 9, 2024
18217d6
Clean scripts
jgcrosta Apr 9, 2024
adb3600
Debug metadata on scout-audit
jgcrosta Apr 9, 2024
c55d647
Run tests on nightly 2023-12-16
jgcrosta Apr 9, 2024
c95eb0e
Default to nightly
jgcrosta Apr 9, 2024
bd44c1a
run only the tests on nightly-2023-12-16
arlosiggio Apr 9, 2024
c9a26cf
add nightly toolchain
arlosiggio Apr 9, 2024
198e702
test
arlosiggio Apr 9, 2024
dfe171c
Test cache
jgcrosta Apr 9, 2024
25b3ed3
Test
jgcrosta Apr 9, 2024
1f4c277
Test without minimal
jgcrosta Apr 9, 2024
a4d8601
Do cargo build
jgcrosta Apr 9, 2024
b475b36
Find librustc_driver
jgcrosta Apr 9, 2024
0d53e32
Revert "Find librustc_driver"
jgcrosta Apr 9, 2024
a2a43ee
Find lib rustc driver
jgcrosta Apr 9, 2024
927b7e0
Update makefile
jgcrosta Apr 10, 2024
0bd8fde
Run with localdetectors
jgcrosta Apr 10, 2024
7d58795
Run on local detectors
jgcrosta Apr 10, 2024
ca79346
Remove find *.so
jgcrosta Apr 10, 2024
7f11566
Try fix local detectors flag
jgcrosta Apr 10, 2024
739900e
Test new cache action
jgcrosta Apr 10, 2024
7c55a23
Test new cache strategy
jgcrosta Apr 10, 2024
2e03bf3
Cache
jgcrosta Apr 10, 2024
817c9fe
Test rust-actions
jgcrosta Apr 10, 2024
be08a34
Try cache with binaries hash
jgcrosta Apr 10, 2024
11fc44b
Try fix local-detectors path, remove cache by binaries
jgcrosta Apr 10, 2024
d2e34fb
Print statements to debug
jgcrosta Apr 10, 2024
94f3f82
Debug
jgcrosta Apr 10, 2024
ad7a667
Cargo clean on tests, cache rustup on build
jgcrosta Apr 11, 2024
7388b09
Remove unneeded stuff
jgcrosta Apr 11, 2024
fc971b1
Delete apps, clippy-utils and scout-internal
jgcrosta Apr 11, 2024
a6a442f
Enhance makefile, trigger workflow on scripts/** and validate detecto…
jgcrosta Apr 11, 2024
649d4d1
Checkout again for cache key purposes
jgcrosta Apr 11, 2024
3b9b34a
Remove duplicate print_results function
jgcrosta Apr 11, 2024
a19cc9c
Set cargo fmt to check-mode
jgcrosta Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 71 additions & 27 deletions .github/workflows/general-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,109 @@ on:
branches:
- "main"
paths:
- "apps/cargo-scout-audit/**"
- "detectors/**"
- "test-cases/**"
- "Makefile"
- "scripts/**"
pull_request:
paths:
- "apps/cargo-scout-audit/**"
- "detectors/**"
- "test-cases/**"
- "Makefile"
workflow_dispatch:
- "scripts/**"

env:
CARGO_TERM_COLOR: always
PYTHONUNBUFFERED: 1

jobs:
format:
name: Format
name: Check Rust Format
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v4

- name: Update Rust
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Update Rust Toolchain
run: rustup update

- name: Install Rust nightly
run: rustup install nightly --profile minimal

- name: Install Rustfmt
- name: Install rustfmt
run: rustup component add rustfmt --toolchain nightly

- name: Run cargo fmt
run: make fmt-rust-check
- name: Check Format
run: python scripts/run-fmt.py --dir test-cases detectors

clippy:
name: Clippy
name: Lint with Clippy
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v4

- name: Cache cargo-scout-audit dependencies
id: cache-cargo-scout-audit-dependencies
uses: actions/cache@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
path: ./apps/cargo-scout-audit/target
key: ${{ runner.os }}-cargo-${{ hashFiles('apps/cargo-scout-audit/Cargo.lock') }}
python-version: "3.10"

- name: Update Rust
run: rustup update
- name: Cache Rust Dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo
~/.rustup
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}

- name: Install Rust nightly-2023-09-29
run: rustup install nightly-2023-09-29-x86_64-unknown-linux-gnu --profile minimal
- name: Update Rust Toolchain
run: rustup update

- name: Install Clippy
run: rustup component add clippy --toolchain nightly-2023-09-29-x86_64-unknown-linux-gnu
- name: Install Rust nightly
run: rustup install nightly-2023-12-16 --profile minimal

- name: Install dylint-link
run: cargo install dylint-link

- name: Run clippy
run: make lint
- name: Install clippy
run: rustup component add clippy --toolchain nightly-2023-12-16

- name: Lint with Clippy
run: python scripts/run-clippy.py --dir test-cases detectors

comment-on-pr:
name: Comment on PR
runs-on: ubuntu-latest
if: ${{ always()}}
needs: [format, clippy]
steps:
- name: Find comment
id: find_comment
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: "🎉 **General Rust Workflow Summary** 🎉"

- name: Create or Update PR Comment
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: replace
issue-number: ${{ github.event.pull_request.number }}
body: |
🎉 **General Rust Workflow Summary** 🎉

| Component | Status |
|---------------------------|--------|
| Check Rust Format | ${{ (needs.format.outputs.status == 'success' && '✅ Successful') || '❌ Failed' }} |
| Lint with Clippy | ${{ (needs.clippy.outputs.status == 'success' && '✅ Successful') || '❌ Failed' }} |

The workflow has completed. Great job! 🚀
60 changes: 0 additions & 60 deletions .github/workflows/release.yml

This file was deleted.

95 changes: 0 additions & 95 deletions .github/workflows/test-detector-soroban-version.yml

This file was deleted.

Loading
Loading