generated from cortinico/kotlin-gradle-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (89 loc) · 4.41 KB
/
checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
steps:
- name: Checkout Repo
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
- name: Set up LLVM for `llvm-dis` tool
uses: KyleMayes/install-llvm-action@v1
with:
version: '14.0'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run Gradle verification tasks
run: ./gradlew preMerge --continue # execute each of subtasks even if one fails
- name: Test `decompileBitcode` task
run: |
./gradlew :example:decompileBitcode --output "build/bitcode/bitcode.ll"
test -f example/build/bitcode/bitcode.ll
if: success()
- name: Test `extractBitcode` task
run: |
./gradlew :example:extractBitcode --function 'kfun:#main(){}' --output "build/bitcode/main-bitcode.ll"
test -f example/build/bitcode/main-bitcode.ll
if: success()
- name: Test debug `extractBitcodeDebug` task
run: |
./gradlew :example:extractBitcodeDebug --function 'kfun:#main(){}' --output "build/bitcode/main-bitcode-debug.ll"
test -f example/build/bitcode/main-bitcode-debug.ll
if: success()
- name: Test standalone `extractSomeBitcode` task
run: |
./gradlew :example:extractSomeBitcode --function 'kfun:#main(){}' --input "build/bitcode/bitcode.ll" --output "build/bitcode/main-bitcode-by-standalone.ll"
test -f example/build/bitcode/main-bitcode-by-standalone.ll
if: success()
- name: Test multiple functions to extract
run: |
./gradlew :example:extractSomeBitcode --function 'kfun:#main(){}' --function 'kfun:#main(){}' --function 'ThrowIllegalArgumentException' --function 'non-existent' --input "build/bitcode/bitcode.ll" --output "build/bitcode/multiple-functions.ll" --verbose
test -f example/build/bitcode/multiple-functions.ll
if: success()
- name: Test extraction by function patterns
run: |
./gradlew :example:extractSomeBitcode --function-pattern '.*#main.*' --function-pattern '.*#mai.*' --function-pattern 'ThrowIllegalArgumentException' --function-pattern 'non-existent' --input "build/bitcode/bitcode.ll" --output "build/bitcode/patterns.ll" --verbose
test -f example/build/bitcode/patterns.ll
if: success()
- name: Test ignore by function patterns
run: |
./gradlew :example:extractSomeBitcode --function 'kfun:#main(){}' --function 'ThrowIllegalArgumentException' --ignore-function-pattern '.*#main.*' --ignore-function-pattern 'non-existent' --input "build/bitcode/bitcode.ll" --output "build/bitcode/ignore-patterns.ll" --verbose
test -f example/build/bitcode/ignore-patterns.ll
if: success()
- name: Test extraction by line patterns
run: |
./gradlew :example:extractSomeBitcode --line-pattern '.*kfun:.*#hashCode\(\)\{\}kotlin\.Int' --line-pattern 'unreachable' --line-pattern 'non-existent' --input "build/bitcode/bitcode.ll" --output "build/bitcode/line-patterns.ll" --verbose
test -f example/build/bitcode/line-patterns.ll
if: success()
# warning: this test depends on the build.gradle.kts configuration
- name: Test standalone `decompileSomeBitcode` task customization
run: |
./gradlew :example:decompileBitcode
./gradlew :example:decompileSomeBitcode --input "build/bitcode/releaseSources/out.bc"
test -f example/build/bitcode/standalone-bitcode.ll
if: success()
# warning: this test depends on the build.gradle.kts configuration
- name: Test custom ExtractBitcodeTask
run: |
./gradlew :example:extractCustomBitcode --output "build/bitcode/custom-bitcode.ll"
test -f example/build/bitcode/custom-bitcode.ll
if: success()