Skip to content

Commit

Permalink
build(fix Linux CI): make all folder in lowercase (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
mineme0110 authored Jun 23, 2023
1 parent 19df6b4 commit 31a913f
Show file tree
Hide file tree
Showing 186 changed files with 95 additions and 47 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/Deployment.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,73 @@
name: Deployment

defaults:
run:
shell: bash

concurrency:
group: '${{ github.head_ref }}${{ github.ref }}'
group: ${{ github.head_ref }}${{ github.ref }}
cancel-in-progress: true

env:
JAVA_VERSION: 11
NODEJS_VERSION: 16.17.0
ATALA_GITHUB_ACTOR: '${{ secrets.ATALA_GITHUB_ACTOR }}'
ATALA_GITHUB_TOKEN: '${{ secrets.ATALA_GITHUB_TOKEN }}'
'on':
ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}

on:
workflow_dispatch: null

jobs:
deployment:
strategy:
matrix:
include:
- os: macos-latest
os-type: macos
runs-on: '${{ matrix.os }}'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
key: '${{ runner.os }}-gradle-${{ hashFiles(''**/*.gradle*'') }}'
key: "${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}"
restore-keys: |
${{ runner.os }}-gradle-
- name: 'Install Java ${{ env.JAVA_VERSION }}'
- name: "Install Java ${{ env.JAVA_VERSION }}"
uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
java-version: "${{ env.JAVA_VERSION }}"
distribution: zulu
- name: 'Install NodeJS ${{ env.NODEJS_VERSION }}'

- name: "Install NodeJS ${{ env.NODEJS_VERSION }}"
if: matrix.os-type == 'linux'
uses: actions/setup-node@v3
with:
node-version: '${{ env.NODEJS_VERSION }}'
node-version: "${{ env.NODEJS_VERSION }}"

- name: Install Homebrew
if: matrix.os-type == 'macos'
run: >
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: 'Install autoconf, automake, libtool'
- name: "Install autoconf, automake, libtool"
if: matrix.os-type == 'macos'
run: |
brew install autoconf automake libtool
- name: Publish Maven artifacts to Github Packages
id: publish
run: |
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
pull_request:

jobs:

lint:
name: Lint changes
runs-on: ubuntu-latest
Expand All @@ -36,9 +35,11 @@ jobs:
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
fetch-depth: 0

- name: Mega-Linter
id: ml
uses: megalinter/megalinter@v6

- name: Archive production artifacts
if: success() || failure()
uses: actions/upload-artifact@v3
Expand All @@ -52,15 +53,16 @@ jobs:
strategy:
matrix:
include:
# - os: ubuntu-latest
# os-type: linux
# commented until we figure out the root cause for Gradle failing on Linux
# TODO: To be investigated
- os: ubuntu-latest
os-type: linux
- os: macos-latest
os-type: macos
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Validate Gradle Wrapper
run: pwd

- name: Checkout the repo
uses: actions/checkout@v3
with:
Expand All @@ -84,7 +86,7 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'zulu'
distribution: "zulu"

- name: Install NodeJS ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
Expand All @@ -104,17 +106,7 @@ jobs:
- name: Test Kotlin code is properly formatted
run: ./gradlew ktlintCheck

- name: Build for iOS, macOS, tvOS, watchOS
if: matrix.os-type == 'macos'
run: |
./gradlew build check allTests --stacktrace
# ./gradlew clean build iosX64Test --stacktrace
# removed watchosX64Test as GitHub action gets Invalid device: Apple Watch Series 5 - 44mm
# no longer supporting them => macosX64Test tvosX64Test
# TODO: To be investigated

- name: Build for JS, Linux, Android, JVM
if: matrix.os-type == 'linux'
- name: Build Check All tests
run: |
./gradlew build check allTests --stacktrace
Expand Down
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ a3cb543f5569a83597a4fcada367914beb55ed70:base-asymmetric-encryption/src/commonTe
88e085a38001a26caf05d151761801430452c137:base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMX25519KeyPair.kt:generic-api-key:4
c8e0b0e540e5b35e2b87be63d3866895afc2e709:base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1KeyPair.kt:generic-api-key:4
c8e0b0e540e5b35e2b87be63d3866895afc2e709:ecdsa/src/commonTest/kotlin/io/iohk/atala/prism/apollo/ecdsa/KMMECDSATests.kt:generic-api-key:125
4227c2c7612f2f209438746185751419f9e52efc:base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMX25519KeyPair.kt:generic-api-key:4
19 changes: 19 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"ignorePatterns": [
{
"pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml"
},
{
"pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml"
},
{
"pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml/badge.svg"
},
{
"pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml/badge.svg"
}
],
"retryOn429": true,
"retryCount": 5,
"aliveStatusCodes": [ 200, 203 ]
}
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ APPLY_FIXES: none
FILTER_REGEX_EXCLUDE: (karma.config.js|polyfill.js|timeout.js)
VALIDATE_ALL_CODEBASE: true
REPOSITORY_DEVSKIM_DISABLE_ERRORS: true
MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: (pull-request.yml|Deployment.yml|badge.svg)

DISABLE_LINTERS:
- MARKDOWN_MARKDOWN_LINK_CHECK
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ kotlin {
commonMain {
dependencies {
// This following is just an example you can import it as per you needs
implementation 'io.iohk.atala.prism:apollo:${latest version}'
implementation 'io.iohk.atala.prism.apollo:apollo:${latest version}'
}
}
}
Expand Down Expand Up @@ -252,7 +252,7 @@ kotlin {
val commonMain by getting {
dependencies {
// This following is just an example you can import it as per you needs
implementation("io.iohk.atala.prism:apollo:<latest version>")
implementation("io.iohk.atala.prism.apollo:apollo:<latest version>")
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
classpath("com.android.tools.build:gradle:7.2.2")
// classpath("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.21")
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ final class MD4 : MDHelper(true, 8), HMACInterface {
override fun doPadding(output: ByteArray, outputOffset: Int) {
makeMDPadding()
for (i in 0..3) MathHelper.encodeLEInt(
currentVal[i], output,
currentVal[i],
output,
outputOffset + 4 * i
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ final class MD5 : MDHelper(true, 8), HMACInterface {
makeMDPadding()
for (i in 0..3) MathHelper.encodeLEInt(
currentVal[i],
output, outputOffset + 4 * i
output,
outputOffset + 4 * i
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ final class SHA0 : MDHelper(false, 8), HMACInterface {
makeMDPadding()
for (i in 0..4) MathHelper.encodeBEInt(
currentVal[i],
output, outputOffset + 4 * i
output,
outputOffset + 4 * i
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ final class SHA1 : MDHelper(false, 8), HMACInterface {
makeMDPadding()
for (i in 0..4) MathHelper.encodeBEInt(
currentVal[i],
output, outputOffset + 4 * i
output,
outputOffset + 4 * i
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ open class BLAKE2B : Digest {
m[j] = MathHelper.decodeLELong(message, messagePos + j * 8)
}
for (round in 0 until ROUNDS) {

// G apply to columns of internalState:m[blake2b_sigma[round][2 *
// blockPos]] /+1
// G apply to columns of internalState:m[blake2b_sigma[round][2 * blockPos]] /+1
g(m[blake2b_sigma[round][0].toInt()], m[blake2b_sigma[round][1].toInt()], 0, 4, 8, 12)
g(m[blake2b_sigma[round][2].toInt()], m[blake2b_sigma[round][3].toInt()], 1, 5, 9, 13)
g(m[blake2b_sigma[round][4].toInt()], m[blake2b_sigma[round][5].toInt()], 2, 6, 10, 14)
Expand Down Expand Up @@ -389,9 +387,14 @@ open class BLAKE2B : Digest {
companion object {
// Blake2b Initialization Vector:
private val blake2b_IV = longArrayOf(
0x6a09e667f3bcc908L, -0x4498517a7b3558c5L, 0x3c6ef372fe94f82bL,
-0x5ab00ac5a0e2c90fL, 0x510e527fade682d1L, -0x64fa9773d4c193e1L,
0x1f83d9abfb41bd6bL, 0x5be0cd19137e2179L
0x6a09e667f3bcc908L,
-0x4498517a7b3558c5L,
0x3c6ef372fe94f82bL,
-0x5ab00ac5a0e2c90fL,
0x510e527fade682d1L,
-0x64fa9773d4c193e1L,
0x1f83d9abfb41bd6bL,
0x5be0cd19137e2179L
)

// Message word permutations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,38 @@ open class BLAKE2S : Digest {
private var nodeOffset = 0L
private var nodeDepth = 0
private var innerHashLength = 0

/**
* Whenever this buffer overflows, it will be processed in the compress()
* function. For performance issues, long messages will not use this buffer.
*/
private var buffer: ByteArray? = null

/**
* Position of last inserted byte
*/
private var bufferPos = 0 // a value from 0 up to BLOCK_LENGTH_BYTES

/**
* Internal state, in the BLAKE2 paper it is called v
*/
private var internalState = IntArray(16)

/**
* State vector, in the BLAKE2 paper it is called h
*/
private var chainValue: IntArray? = null

/**
* holds least significant bits of counter
*/
private var t0 = 0

/**
* holds most significant bits of counter
*/
private var t1 = 0

/**
* finalization flag, for last block: ~0
*/
Expand Down Expand Up @@ -372,7 +379,6 @@ open class BLAKE2S : Digest {
m[j] = MathHelper.decodeLEInt(message!!, messagePos + j * 4)
}
for (round in 0 until ROUNDS) {

// G apply to columns of internalState:m[blake2s_sigma[round][2 *
// blockPos]] /+1
g(m[blake2s_sigma[round][0].toInt()], m[blake2s_sigma[round][1].toInt()], 0, 4, 8, 12)
Expand Down Expand Up @@ -408,13 +414,19 @@ open class BLAKE2S : Digest {
}

companion object {

/**
* BLAKE2s Initialization Vector
*/
private val blake2s_IV = intArrayOf(
0x6a09e667, -0x4498517b, 0x3c6ef372,
-0x5ab00ac6, 0x510e527f, -0x64fa9774,
0x1f83d9ab, 0x5be0cd19
0x6a09e667,
-0x4498517b,
0x3c6ef372,
-0x5ab00ac6,
0x510e527f,
-0x64fa9774,
0x1f83d9ab,
0x5be0cd19
)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ abstract class HashingBase : Digest {
private val blockLen: Int
private var inputLen: Int
private var outputBuf: ByteArray

/**
* Get the "block count": this is the number of times the
* [.processBlock] method has been invoked for the
Expand All @@ -18,6 +19,7 @@ abstract class HashingBase : Digest {
*/
protected var blockCount: Long
private set

/**
* Get a reference to an internal buffer with the same size
* than a block. The contents of that buffer are defined only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ abstract class MDHelper(
} else {
MathHelper.encodeBEInt(
(currentLength ushr 32).toInt(),
countBuf, lenlen - 8
countBuf,
lenlen - 8
)
MathHelper.encodeBEInt(
currentLength.toInt(),
countBuf, lenlen - 4
countBuf,
lenlen - 4
)
}
val endLen = dataLen + lenlen + blen and (blen - 1).inv()
Expand Down
1 change: 0 additions & 1 deletion jose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target

val currentModuleName = "JOSE"
val os: OperatingSystem = OperatingSystem.current()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 31a913f

Please sign in to comment.