Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Updating master-ci.yml #239

Updating master-ci.yml

Updating master-ci.yml #239

Workflow file for this run

name: Kryptokrona Kotlin SDK Master Pipeline
env:
KRYPTOKRONA_NODE_KOVER_XML: ./kryptokrona-node/build/reports/kover/report.xml
KRYPTOKRONA_CRYPTO_KOVER_XML: ./kryptokrona-crypto/build/reports/kover/report.xml
KRYPTOKRONA_WALLET_KOVER_XML: ./kryptokrona-wallet/build/reports/kover/report.xml
KRYPTOKRONA_SERVICE_KOVER_XML: ./kryptokrona-service/build/reports/kover/report.xml
on:
push:
branches:
- master
- develop
jobs:
build:
name: "Build: ${{ matrix.config.name }} / ${{ matrix.config.platform }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
- { name: "Windows Latest", os: windows-latest, platform: x64 }
- { name: "Ubuntu Latest", os: ubuntu-latest, platform: x64 }
- { name: "macOS 11", os: macos-11, platform: x64 }
- { name: "macOS Latest", os: macos-latest, platform: arm64 }
steps:
- uses: actions/checkout@v3
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Assemble
run: ./gradlew assemble
- name: "Set up MinGW for ${{ matrix.config.name }}"
if: matrix.config.os == 'windows-latest'
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
- name: Compile C library
run: ./gradlew cReCompile
- name: Copy C library
run: ./gradlew copyCLibrary
- name: Copy C headers
run: ./gradlew copyCHeaders
- name: Upload C library
uses: actions/upload-artifact@v3
with:
name: kryptokrona-crypto
path: kryptokrona-crypto/build/libs
- name: Upload C headers
uses: actions/upload-artifact@v3
with:
name: kryptokrona-crypto-headers
path: kryptokrona-crypto/build/headers
unit-test:
name: Unit Test
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Download C library
uses: actions/download-artifact@v3
with:
name: kryptokrona-crypto
path: kryptokrona-crypto/build/libs
- name: Download C headers
uses: actions/download-artifact@v3
with:
name: kryptokrona-crypto-headers
path: kryptokrona-crypto/build/headers
- name: Run Unit Test
run: ./gradlew test
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@master
- name: Download C library
uses: actions/download-artifact@v3
with:
name: kryptokrona-crypto
path: kryptokrona-crypto/build/libs
- name: Download C headers
uses: actions/download-artifact@v3
with:
name: kryptokrona-crypto-headers
path: kryptokrona-crypto/build/headers
- name: Generate Kover XML Reports
run: ./gradlew test koverXmlReport
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ env.KRYPTOKRONA_CRYPTO_KOVER_XML }}, ${{ env.KRYPTOKRONA_NODE_KOVER_XML }}, ${{ env.KRYPTOKRONA_WALLET_KOVER_XML }}, ${{ env.KRYPTOKRONA_SERVICE_KOVER_XML }}
flags: unittests
layout: horizontal
name: codecov-umbrella
fail_ci_if_error: true
verbose: false
config: config/codecov.yml
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Run Detekt
run: |
./gradlew detekt