Prepare project to the release 🤞 #3
Workflow file for this run
This file contains 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
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() |