Skip to content

Commit

Permalink
Setup Github Actions for Client, Transport, and Server. Removed unuse…
Browse files Browse the repository at this point in the history
…d import

* Create actions.yml for github action workflows
* removed unused javax.websocket dependency on bundle server ServerSecurity.java
* disabled proguard minify on release build
  • Loading branch information
gokris165 authored Feb 1, 2024
1 parent ee4b9bb commit 9594caf
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 31 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build Modules
# Runs workflow only when pull requests are made to
# the 'main' branch
on:
pull_request:
branches: main

jobs:
# Github Action to detect file changes between
# main branch and pull request branch
changes:
runs-on: ubuntu-latest
outputs:
client: ${{ steps.filter.outputs.client }}
transport: ${{ steps.filter.outputs.transport }}
server: ${{ steps.filter.outputs.server }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
# Detect any changes to the following folders
filters: |
client:
- 'BundleClient/**'
transport:
- 'BundleTransport/**'
server:
- 'bundleserver/**'
# Github Action to Compile BundleClient
build-bundle-client:
needs: changes
# Compile BundleClient only if files were changed here
if: ${{ needs.changes.outputs.client == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup gradle
uses: gradle/gradle-build-action@v2

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Run gradle build on BundleClient
working-directory: ./BundleClient
run: ./gradlew build


# Github Action to Compile BundleTransport
build-bundle-transport:
needs: changes
# Compile BundleTransport only if files were changed here
if: ${{ needs.changes.outputs.transport == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup gradle
uses: gradle/gradle-build-action@v2

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Run gradle build on BundleTransport
working-directory: ./BundleTransport
run: ./gradlew build


# Github Action to Compile bundleserver
build-bundle-server:
needs: changes
# Compile bundleserver only if files were changed here
if: ${{ needs.changes.outputs.server == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Run maven package on BundleServer
working-directory: ./bundleserver
run: mvn package
2 changes: 1 addition & 1 deletion BundleTransport/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
buildTypes {
debug { minifyEnabled false }
release {
minifyEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down
3 changes: 0 additions & 3 deletions bundleserver/.idea/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions bundleserver/.idea/encodings.xml

This file was deleted.

11 changes: 0 additions & 11 deletions bundleserver/.idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions bundleserver/.idea/vcs.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import java.util.List;
import java.util.stream.Stream;

import javax.websocket.EncodeException;

import org.whispersystems.libsignal.IdentityKey;
import org.whispersystems.libsignal.IdentityKeyPair;
import org.whispersystems.libsignal.InvalidKeyException;
Expand Down

0 comments on commit 9594caf

Please sign in to comment.