Skip to content

Commit

Permalink
Setup CI (hyperledger#12)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 authored Aug 25, 2023
1 parent 0a1b973 commit 295f7c8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@ jobs:
${{ runner.os }}-gradle-${{ hashFiles('**/gradle/versions.gradle') }}
${{ runner.os }}-gradle-
- name: Assemble
run: ./gradlew --no-daemon clean spotlessCheck build
- name: Spotless
run: ./gradlew clean spotlessCheck

- name: Test & Build
run: ./gradlew build

- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JUnit Tests # Name of the check run which will be created
path: '**/test-results/test/*.xml' # Path to test results
reporter: java-junit # Format of test results
only-summary: true
max-annotations: 50

- name: Store distribution artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: distributions
path: build/distributions
Expand All @@ -50,14 +63,11 @@ jobs:
./gradlew dockerDist
- name: Login to Docker Hub for self hosted
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER_RW }}
password: ${{ secrets.DOCKER_PAT_RW }}
- name: Publish Docker Image
run: |
./gradlew --no-daemon dockerUpload

- name: Publish Multi-arch Docker Image
- name: Publish Docker Image
run: |
./gradlew --no-daemon dockerManifest
./gradlew dockerUpload
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.bouncycastle.crypto.digests.SHA256Digest;
import org.hyperledger.besu.evm.precompile.KZGPointEvalPrecompiledContract;

public class BlobTestFixture {

public BlobTestFixture() {
try {
// optimistically tear down a potential previous loaded trusted setup
KZGPointEvalPrecompiledContract.tearDown();
} catch (Throwable ignore) {
// and ignore errors in case no trusted setup was already loaded
}
try {
CKZG4844JNI.loadNativeLibrary(CKZG4844JNI.Preset.MAINNET);
CKZG4844JNI.loadTrustedSetupFromResource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static void init(final String networkName) {

/** free up resources. */
@VisibleForTesting
void tearDown() {
public static void tearDown() {
CKZG4844JNI.freeTrustedSetup();
loaded.set(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void init() {

@AfterAll
public static void tearDown() {
contract.tearDown();
KZGPointEvalPrecompiledContract.tearDown();
}

@ParameterizedTest(name = "{index}")
Expand Down

0 comments on commit 295f7c8

Please sign in to comment.