Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorporated reformat workflow into actions.yml #61

Merged
merged 51 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e3b3964
incorporated reformat workflow into actions.yml
gokris165 May 29, 2024
cc86f8b
Auto-format code
github-actions[bot] May 29, 2024
c04351f
deleted bundleDTO for testing purposes
gokris165 May 29, 2024
9664fd9
Merge branch 'workflow-update' of github.com:SJSU-CS-systems-group/DD…
gokris165 May 29, 2024
dbeae35
testing patch
gokris165 May 29, 2024
3a60041
modify workflows
gokris165 May 29, 2024
eab4840
test patch
gokris165 May 29, 2024
979ff4c
Auto-format code
github-actions[bot] May 29, 2024
450f02e
testing patch
gokris165 May 29, 2024
2b2a217
Merge branch 'workflow-update' of github.com:SJSU-CS-systems-group/DD…
gokris165 May 29, 2024
4388542
testing patch
gokris165 May 29, 2024
ca56f02
testing patch
gokris165 May 29, 2024
1bb0938
Auto-format code
github-actions[bot] May 29, 2024
4eb010b
test patch
gokris165 May 29, 2024
0d4785c
Merge branch 'workflow-update' of github.com:SJSU-CS-systems-group/DD…
gokris165 May 29, 2024
098c049
test patch
gokris165 May 29, 2024
a7eeef8
Auto-format code
github-actions[bot] May 29, 2024
2c8ba3a
run actions.yml after reformat.yml
gokris165 Jun 3, 2024
8b3b50a
Merge branch 'main' of github.com:SJSU-CS-systems-group/DDD into work…
gokris165 Jun 3, 2024
290c53d
testing new workflow
gokris165 Jun 3, 2024
9ee13b1
Auto-format code
github-actions[bot] Jun 3, 2024
14639ec
patch
gokris165 Jun 3, 2024
10cd59f
merged
gokris165 Jun 3, 2024
9b107bb
patch
gokris165 Jun 3, 2024
df8bf17
Auto-format code
github-actions[bot] Jun 3, 2024
ba7f391
using workflow_call now
gokris165 Jun 3, 2024
1d8a3e9
patch
gokris165 Jun 3, 2024
df6a70a
Merge branch 'workflow-update' of github.com:SJSU-CS-systems-group/DD…
gokris165 Jun 3, 2024
896fc67
jarfile patch for test
gokris165 Jun 3, 2024
7ec6845
Auto-format code
github-actions[bot] Jun 3, 2024
9f7a2ae
patch
gokris165 Jun 3, 2024
84b2f06
Auto-format code
github-actions[bot] Jun 3, 2024
e1a5b5d
test patch
gokris165 Jun 3, 2024
7b4baa6
test patch again
gokris165 Jun 3, 2024
a13bfbb
patch
gokris165 Jun 3, 2024
0c727e5
patch
gokris165 Jun 3, 2024
cee6e73
Auto-format code
github-actions[bot] Jun 3, 2024
3691deb
patch
gokris165 Jun 3, 2024
df688c9
patch
gokris165 Jun 3, 2024
98e67ab
patch
gokris165 Jun 3, 2024
87a5a3d
new approach
gokris165 Jun 3, 2024
2085f30
Auto-format code
github-actions[bot] Jun 3, 2024
def597b
test
gokris165 Jun 3, 2024
88c678a
Auto-format code
github-actions[bot] Jun 3, 2024
6dca3e3
new approach
gokris165 Jun 3, 2024
0c70502
Auto-format code
github-actions[bot] Jun 3, 2024
b2e7172
patch
gokris165 Jun 3, 2024
46a362b
Auto-format code
github-actions[bot] Jun 3, 2024
5222306
test
gokris165 Jun 3, 2024
18d1dff
final test
gokris165 Jun 3, 2024
7d39810
Auto-format code
github-actions[bot] Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 51 additions & 44 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
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
# Github Action to detect file changes between
# main branch and pull request branch
changes:
runs-on: ubuntu-latest
Expand All @@ -18,7 +17,7 @@ jobs:
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
with:
# Detect any changes to the following folders
filters: |
core:
Expand All @@ -30,7 +29,6 @@ jobs:
server:
- 'bundleserver/**'


# Github Action to Compile bundle-core
build-bundle-core:
needs: changes
Expand All @@ -43,42 +41,40 @@ jobs:

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

- name: Run maven package on bundle-core
working-directory: ./bundle-core
run: mvn package


# 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: Checkout repository
uses: actions/checkout@v4

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

- name: Run maven package on server dependency > bundle-core
working-directory: ./bundle-core
run: mvn install
- 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
- name: Run maven package on server dependency > bundle-core
working-directory: ./bundle-core
run: mvn install

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

# Github Action to Compile BundleTransport
build-bundle-transport:
Expand All @@ -87,22 +83,21 @@ jobs:
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: Checkout repository
uses: actions/checkout@v4

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

- name: Run gradle build on BundleTransport
working-directory: ./BundleTransport
run: ./gradlew build
- 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:
Expand All @@ -113,17 +108,29 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Run maven package on server dependency > bundle-core
working-directory: ./bundle-core
run: mvn install

- name: Run maven package on BundleServer
working-directory: ./bundleserver
run: mvn package

call-auto-formatter:
needs:
[
changes,
build-bundle-core,
build-bundle-client,
build-bundle-transport,
build-bundle-server,
]
if: ${{ always() }}
uses: SJSU-CS-systems-group/DDD/.github/workflows/reformat.yml@e1a5b5d545257636739b62cfd69eac17c63e24d3
39 changes: 18 additions & 21 deletions .github/workflows/reformat.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
name: Re-format Code

on:
pull_request:
branches:
- main
workflow_call:

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Install IntelliJ IDEA
run: |
wget -q -O idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2024.1.1.tar.gz
tar -xzf idea.tar.gz
- name: Install IntelliJ IDEA
run: |
wget -q -O idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2024.1.1.tar.gz
tar -xzf idea.tar.gz

- name: Format code
run: |
./*/bin/format.sh -m *.java -r .

- name: Commit changes
run: |
git config user.name 'github-actions[bot]'
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -a -m "Auto-format code"
git push
- name: Format code
run: |
./*/bin/format.sh -m *.java -r .

- name: Commit changes
run: |
git config user.name 'github-actions[bot]'
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -a -m "Auto-format code"
git push
1 change: 0 additions & 1 deletion BundleClient/app/src/main/java/com/ddd/utils/JarUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.zip.CheckedInputStream;

import android.util.Base64;

import com.ddd.datastore.filestore.FileStoreHelper;

public class JarUtils {
Expand Down
1 change: 1 addition & 0 deletions bundle-core/src/main/java/com/ddd/model/BundleDTO.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ddd.model;

public class BundleDTO {

private String bundleId;
private Bundle bundle;

Expand Down