-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ice53a2bd63e0b40901e83a8d1fdd8e30025dcbf2
- Loading branch information
1 parent
14048e0
commit adbe086
Showing
12 changed files
with
393 additions
and
119 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "cargo", | ||
"name": "Cargo test", | ||
"cargoArgs": [ | ||
"test" | ||
], | ||
}, | ||
{ | ||
"type": "cargo", | ||
"name": "Cargo test feature encryption", | ||
"cargoArgs": [ | ||
"test" | ||
], | ||
"cargoExtraArgs": [ | ||
"--features", | ||
"encryption" | ||
], | ||
}, | ||
|
||
{ | ||
"type": "command", | ||
"name": "Build All", | ||
"program": "./build.sh", | ||
}, | ||
{ | ||
"type": "command", | ||
"name": "Build Android", | ||
"program": "./build_android.sh", | ||
}, | ||
{ | ||
"type": "command", | ||
"name": "Build Apple", | ||
"program": "./build_apple.sh", | ||
}, | ||
{ | ||
"type": "gradle", | ||
"workingDir": "./android/", | ||
"name": "Gradle Build", | ||
"tasks": [ | ||
"assembleDebug" | ||
], | ||
}, | ||
{ | ||
"type": "gradle", | ||
"workingDir": "./android/", | ||
"name": "Gradle Connected Android Test", | ||
"tasks": [ | ||
"connectedAndroidTest" | ||
], | ||
}, | ||
{ | ||
"type": "command", | ||
"name": "Swift Test", | ||
"workingDir": "./ios/MMKV/", | ||
"program": "swift", | ||
"args": [ | ||
"test" | ||
], | ||
}, | ||
|
||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
name: Publish Android package | ||
on: | ||
release: | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Decode Keystore | ||
env: | ||
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }} | ||
GPG_SECRET: ${{ secrets.GPG_SECRET }} | ||
run: | | ||
echo ${ENCODED_KEYSTORE} | base64 -d > ./android/app/keystore.jks | ||
echo ${GPG_SECRET} | base64 -d | gpg --dearmor > ./android/secret.gpg | ||
- name: Decode Keystore | ||
env: | ||
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }} | ||
GPG_SECRET: ${{ secrets.GPG_SECRET }} | ||
run: | | ||
echo ${ENCODED_KEYSTORE} | base64 -d > ./android/app/keystore.jks | ||
echo ${GPG_SECRET} | base64 -d | gpg --dearmor > ./android/secret.gpg | ||
- name: Android publish | ||
env: | ||
SIGN_KEY_STORE_PATH: keystore.jks | ||
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }} | ||
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }} | ||
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }} | ||
SONATYPEUSERNAME: ${{ secrets.SONATYPEUSERNAME }} | ||
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_PWD: ${{ secrets.GPG_PWD }} | ||
run: | | ||
cd ./android | ||
echo SIGN_KEY_STORE_PATH=keystore.jks >> local.properties | ||
echo SIGN_STORE_PASSWORD=${SIGN_STORE_PASSWORD} >> local.properties | ||
echo SIGN_KEY_ALIAS=${SIGN_KEY_ALIAS} >> local.properties | ||
echo SIGN_KEY_PASSWORD=${SIGN_KEY_PASSWORD} >> local.properties | ||
echo sonatypeUsername=${SONATYPEUSERNAME} >> local.properties | ||
echo sonatypePassword=${SONATYPEPASSWORD} >> local.properties | ||
echo signing.keyId=${GPG_KEY_ID} >> local.properties | ||
echo signing.password=${GPG_PWD} >> local.properties | ||
echo signing.secretKeyRingFile=../secret.gpg >> local.properties | ||
chmod +x gradlew | ||
./gradlew clean | ||
./gradlew publish | ||
- name: Android publish | ||
env: | ||
SIGN_KEY_STORE_PATH: keystore.jks | ||
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }} | ||
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }} | ||
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }} | ||
SONATYPEUSERNAME: ${{ secrets.SONATYPEUSERNAME }} | ||
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_PWD: ${{ secrets.GPG_PWD }} | ||
run: | | ||
cd ./android | ||
echo SIGN_KEY_STORE_PATH=keystore.jks >> local.properties | ||
echo SIGN_STORE_PASSWORD=${SIGN_STORE_PASSWORD} >> local.properties | ||
echo SIGN_KEY_ALIAS=${SIGN_KEY_ALIAS} >> local.properties | ||
echo SIGN_KEY_PASSWORD=${SIGN_KEY_PASSWORD} >> local.properties | ||
echo sonatypeUsername=${SONATYPEUSERNAME} >> local.properties | ||
echo sonatypePassword=${SONATYPEPASSWORD} >> local.properties | ||
echo signing.keyId=${GPG_KEY_ID} >> local.properties | ||
echo signing.password=${GPG_PWD} >> local.properties | ||
echo signing.secretKeyRingFile=../secret.gpg >> local.properties | ||
chmod +x gradlew | ||
./gradlew clean | ||
./gradlew publish |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,55 @@ | ||
name: Android Build Check | ||
|
||
on: | ||
push: | ||
on: | ||
push: | ||
branches: [ "main", "develop" ] | ||
pull_request: | ||
pull_request: | ||
branches: [ "main", "develop" ] | ||
|
||
jobs: | ||
build: | ||
jobs: | ||
build: | ||
|
||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Decode Keystore | ||
env: | ||
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }} | ||
run: echo ${ENCODED_KEYSTORE} | base64 -d > ./android/app/keystore.jks | ||
|
||
- name: Build with Gradle | ||
env: | ||
SIGN_KEY_STORE_PATH: keystore.jks | ||
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }} | ||
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }} | ||
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }} | ||
run: | | ||
cd ./android | ||
echo SIGN_KEY_STORE_PATH=keystore.jks >> local.properties | ||
echo SIGN_STORE_PASSWORD=${SIGN_STORE_PASSWORD} >> local.properties | ||
echo SIGN_KEY_ALIAS=${SIGN_KEY_ALIAS} >> local.properties | ||
echo SIGN_KEY_PASSWORD=${SIGN_KEY_PASSWORD} >> local.properties | ||
chmod +x gradlew | ||
./gradlew clean | ||
./gradlew assembleDebug | ||
- name: Android test | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
target: google_apis_playstore | ||
arch: x86_64 | ||
script: cd ./android; ./gradlew connectedAndroidTest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Decode Keystore | ||
env: | ||
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }} | ||
run: echo ${ENCODED_KEYSTORE} | base64 -d > ./android/app/keystore.jks | ||
|
||
- name: Build with Gradle | ||
env: | ||
SIGN_KEY_STORE_PATH: keystore.jks | ||
SIGN_STORE_PASSWORD: ${{ secrets.SIGN_STORE_PASSWORD }} | ||
SIGN_KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }} | ||
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }} | ||
SONATYPEUSERNAME: ${{ secrets.SONATYPEUSERNAME }} | ||
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }} | ||
run: | | ||
cd ./android | ||
echo SIGN_KEY_STORE_PATH=keystore.jks >> local.properties | ||
echo SIGN_STORE_PASSWORD=${SIGN_STORE_PASSWORD} >> local.properties | ||
echo SIGN_KEY_ALIAS=${SIGN_KEY_ALIAS} >> local.properties | ||
echo SIGN_KEY_PASSWORD=${SIGN_KEY_PASSWORD} >> local.properties | ||
echo sonatypeUsername=${SONATYPEUSERNAME} >> local.properties | ||
echo sonatypePassword=${SONATYPEPASSWORD} >> local.properties | ||
chmod +x gradlew | ||
./gradlew clean | ||
./gradlew assembleDebug | ||
- name: Android test | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
target: google_apis_playstore | ||
arch: x86_64 | ||
script: cd ./android; ./gradlew connectedAndroidTest |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
name: Publish Rust package | ||
on: | ||
release: | ||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cargo publish | ||
run: cargo publish --token ${CARGO_REGISTRY_TOKEN} | ||
env: | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
name: Cargo Test | ||
|
||
on: | ||
push: | ||
on: | ||
push: | ||
branches: [ "main", "develop" ] | ||
pull_request: | ||
pull_request: | ||
branches: [ "main", "develop" ] | ||
|
||
env: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build default | ||
run: cargo build --verbose | ||
- name: Build feature encryption | ||
run: cargo build --features encryption --verbose | ||
- name: Run default tests | ||
run: cargo test --verbose | ||
- name: Run feature encryption tests | ||
run: cargo test --features encryption --verbose | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build default | ||
run: cargo build --verbose | ||
- name: Build feature encryption | ||
run: cargo build --features encryption --verbose | ||
- name: Run default tests | ||
run: cargo test --verbose | ||
- name: Run feature encryption tests | ||
run: cargo test --features encryption --verbose |
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
Oops, something went wrong.