Skip to content
Open
Changes from all commits
Commits
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
136 changes: 136 additions & 0 deletions .github/workflows/main_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: CogniCrypt build

on: [push, pull_request]

jobs:

# Builds the project in Windows
windows-build:
# Runs on Windows
runs-on: windows-latest
name: Project build in Windows
steps:
# Downloads CogniCrypt repository
- name: Checkout source code
uses: actions/checkout@v2
# Sets up Java version
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: jdk
java-version: '8'
# Sets up Maven version
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.6.3
# Checks Java version
- name: Check Java version
run: java -version
# Checks Maven version
- name: Check Maven version
run: mvn -version
# Restores Maven dependecies
- name: Restore local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Compiles, tests, and packages the CogniCrypt project
- name: Compile, test, and package the project
run: mvn -B clean install -DskipTests=true -U



# Builds the project in Ubuntu
ubuntu-build:
# Runs on Ubuntu
runs-on: ubuntu-latest
name: Project build in Ubuntu
steps:
# Downloads CogniCrypt repository
- name: Checkout source code
uses: actions/checkout@v2
# Sets up Java version
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: jdk
java-version: '8'
# Sets up Maven version
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.6.3
# Checks Java version
- name: Check Java version
run: java -version
# Checks Maven version
- name: Check Maven version
run: mvn -version
# Restores Maven dependecies
- name: Restore local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Compiles, tests, and packages the CogniCrypt project
- name: Compile, test, and package the project
run: mvn -B clean install -DskipTests=true -U



# Builds the project in macOS
macos-build:
# Runs on macOS
runs-on: macos-latest
name: Project build in macOS
steps:
# Downloads CogniCrypt repository
- name: Checkout source code
uses: actions/checkout@v2
# Sets up Java version
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: jdk
java-version: '8'
# Sets up Maven version
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.6.3
# Checks Java version
- name: Check Java version
run: java -version
# Checks Maven version
- name: Check Maven version
run: mvn -version
# Restores Maven dependecies
- name: Restore local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Compiles, tests, and packages the CogniCrypt project
- name: Compile, test, and package the project
run: mvn -B clean install -DskipTests=true -U


# REFERENCES

# The following link is a short guide for learning GitHub Actions:
# https://docs.github.com/en/actions/learn-github-actions

# We are using Gitub-hosted runners or servers that build our project.
# Up-to-date details about runners and their versions can be found under:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners