Skip to content

Commit

Permalink
build: reorganise apollo and remove unused modules
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-frade-iohk committed Nov 10, 2023
1 parent e65e0f0 commit cbd7e7e
Show file tree
Hide file tree
Showing 232 changed files with 19,640 additions and 22,851 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/Deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ on:

jobs:
deployment:
strategy:
matrix:
include:
- os: macos-latest
os-type: macos
runs-on: ${{ matrix.os }}
runs-on: macos-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -59,39 +54,38 @@ jobs:
distribution: zulu

- name: "Install NodeJS ${{ env.NODEJS_VERSION }}"
if: matrix.os-type == 'linux'
uses: actions/setup-node@v3
with:
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"
if: matrix.os-type == 'macos'
run: |
brew install autoconf automake libtool
- name: Create Swift Package
env:
TAG_VERSION: ${{github.event.inputs.tag}}
run: |
./gradlew :base-asymmetric-encryption:createSwiftPackage
./gradlew :apollo:createSwiftPackage
- name: Zip framework
run: |
target_dir_name="Apollo.xcframework"
source_dir="./base-asymmetric-encryption/build/packages/ApolloSwift/"
source_dir="./apollo/build/packages/ApolloSwift/"
zip_name="Apollo.xcframework.zip"
(cd $source_dir && zip -r "$zip_name" $target_dir_name)
- name: Prepare release package
run: |
checksum=$(swift package compute-checksum 'base-asymmetric-encryption/build/packages/ApolloSwift/Apollo.xcframework.zip')
checksum=$(swift package compute-checksum "apollo/build/packages/ApolloSwift/Apollo.xcframework.zip")
echo "CHECKSUM: $checksum"
rm -f Package.swift || true
./.scripts/updatePackage.swift ${{github.event.inputs.tag}} $checksum './.scripts/TemplatePackage.swift' 'Package.swift'
./.scripts/updatePackage.swift ${{github.event.inputs.tag}} "$checksum" "./.scripts/TemplatePackage.swift" "Package.swift"
- name: Commit package
uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -101,24 +95,24 @@ jobs:
with:
commit_message: "chore: prepare release ${{github.event.inputs.tag}}"
tagging_message: ${{github.event.inputs.tag}}

commit_options: -S --signoff

- name: Upload swift package artifacts
uses: actions/upload-artifact@v3
with:
name: Apollo.xcframework.zip
path: base-asymmetric-encryption/build/packages/ApolloSwift/Apollo.xcframework.zip
path: apollo/build/packages/ApolloSwift/Apollo.xcframework.zip

- name: Add swift package artifacts to release
uses: svenstaro/upload-release-action@v2
with:
tag: ${{github.event.inputs.tag}}
file: base-asymmetric-encryption/build/packages/ApolloSwift/Apollo.xcframework.zip
file: apollo/build/packages/ApolloSwift/Apollo.xcframework.zip
asset_name: "Apollo.xcframework.zip"

- name: Publish Maven artifacts to Github Packages
env:
TAG_VERSION: ${{github.event.inputs.tag}}
id: publish
run: |
./gradlew publishAllPublicationsToGitHubPackagesRepository :base-asymmetric-encryption:publishJsPackageToGithubRegistry
./gradlew publishAllPublicationsToGitHubPackagesRepository :apollo:publishJsPackageToGithubRegistry
48 changes: 3 additions & 45 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,6 @@ env:
on: [pull_request]

jobs:
lint:
name: Lint changes
runs-on: ubuntu-latest
env:
APPLY_FIXES: none
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: commit
VALIDATE_ALL_CODEBASE: ${{ github.ref_name == 'main' }}
DISABLE: COPYPASTE,SPELL
DISABLE_LINTERS: REPOSITORY_CHECKOV,BASH_SHELLCHECK,C_CPPLINT,CPP_CPPLINT
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
fetch-depth: 0

- name: Mega-Linter
id: ml
uses: oxsecurity/[email protected]

- name: Archive production artifacts
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
with:
name: Mega-Linter reports
path: |
report
mega-linter.log
build:
strategy:
matrix:
Expand All @@ -69,26 +38,15 @@ jobs:
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*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install Java ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"

- name: Gradle Build Action
uses: gradle/gradle-build-action@v2

- name: Install NodeJS ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ let package = Package(
// RELEASE
.binaryTarget(
name: "ApolloBinary",
url: "https://github.com/input-output-hk/atala-prism-apollo/releases/download/testSwift2/Apollo.xcframework.zip",
checksum: "817420e940206f912c5dcf92acb3b38bd2b87caef6caebc707ff1ff98c5778b8"
url: "https://github.com/input-output-hk/atala-prism-apollo/releases/download/1.0.15/Apollo.xcframework.zip",
checksum: "ef5242b354dfa922576061da1830ae3037c9ba4a26aeed1c84ce13380bd49fb7"
)
]
)
59 changes: 0 additions & 59 deletions aes/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions aes/aes.podspec

This file was deleted.

9 changes: 0 additions & 9 deletions aes/karma.config.d/karma.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions aes/src/androidMain/AndroidManifest.xml

This file was deleted.

65 changes: 0 additions & 65 deletions aes/src/androidMain/kotlin/io/iohk/atala/prism/apollo/aes/AES.kt

This file was deleted.

This file was deleted.

Loading

0 comments on commit cbd7e7e

Please sign in to comment.