Skip to content

Commit

Permalink
add gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSergey committed Dec 20, 2022
1 parent 073f362 commit f146c11
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 3 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/SonarCloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: SonarCloud

on:
push:
branches:
- develop
- master
pull_request:

jobs:
SonarCloud:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
steps:

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: ''
- run: |
git fetch --prune --unshallow
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Download and install Libs
env:
GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }}
LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }}
run: |
cd lib
gh release download --repo "$LIBS_REPO" 1.0
ls -lh
sh install-libs-lin.sh
- name: SonarCloud Scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
cd clusterAdminLibrary
mvn -B verify sonar:sonar
-Dsonar.projectKey=YanSergey_OneS_ClusterAdmin
-Dsonar.projectName="OneS ClusterAdmin"
-Dsonar.organization=yansergey
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$SONAR_TOKEN
48 changes: 48 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Linux

on:
push:
branches:
- develop
- master
pull_request:
branches:

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Download and install Libs
env:
GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }}
LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }}
run: |
cd lib
gh release download --repo "$LIBS_REPO" 1.0
ls -lh
sh install-libs-lin.sh
- name: Install clusterAdmin lib
run: |
cd clusterAdminLibrary
mvn -B clean install -Plinux -DskipTests
- name: Package Application
run: |
cd clusterAdminApplication
mvn -B clean package -Plinux -DskipTests
- name: Upload build to artifacts
uses: actions/upload-artifact@master
with:
name: OneS_ClusterAdmin-linux
path: ${{ github.workspace }}/clusterAdminApplication/target/OneS_ClusterAdmin-*-linux.jar
48 changes: 48 additions & 0 deletions .github/workflows/build-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build MacOS

on:
push:
branches:
- develop
- master
pull_request:
branches:

jobs:
build:
runs-on: macOS-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Download and install Libs
env:
GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }}
LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }}
run: |
cd lib
gh release download --repo "$LIBS_REPO" 1.0
ls -lh
sh install-libs-lin.sh
- name: Install clusterAdmin lib
run: |
cd clusterAdminLibrary
mvn -B clean install -PmacOS -DskipTests
- name: Package Application
run: |
cd clusterAdminApplication
mvn -B clean package -PmacOS -DskipTests
- name: Upload build to artifacts
uses: actions/upload-artifact@master
with:
name: OneS_ClusterAdmin-macOS
path: ${{ github.workspace }}/clusterAdminApplication/target/OneS_ClusterAdmin-*-macOS.jar
51 changes: 51 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Windows

on:
push:
branches:
- develop
- master
pull_request:
branches:

jobs:
build:
runs-on: windows-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Download and install Libs
env:
GITHUB_TOKEN: ${{ secrets.ONES_IBIS_LIBS_TOKEN }}
LIBS_REPO: ${{ secrets.ONES_IBIS_LIBS_REPO }}
shell: cmd
run: |
cd lib
gh release download --repo "%LIBS_REPO%" 1.0
dir
install-libs-win.bat
- name: Install clusterAdmin lib
shell: cmd
run: |
cd clusterAdminLibrary
mvn -B clean install -Pwindows-x86_64
- name: Package Application
shell: cmd
run: |
cd clusterAdminApplication
mvn -B clean package -Pwindows-x86_64
- name: Upload build to artifacts
uses: actions/upload-artifact@master
with:
name: OneS_ClusterAdmin-windows-x64
path: ${{ github.workspace }}\clusterAdminApplication\target\OneS_ClusterAdmin-*-windows-x64.jar
6 changes: 3 additions & 3 deletions clusterAdminLibrary/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@
</resource>
<resource>
<directory>${basedir}/src/main/java/ru/yanygin/clusterAdminLibrary</directory>
<filtering>true</filtering>
<targetPath>/ru/yanygin/clusterAdminLibrary</targetPath>
<filtering>true</filtering>
<targetPath>${basedir}/target/classes/ru/yanygin/clusterAdminLibrary</targetPath>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/java/ru/yanygin/clusterAdminLibraryUI</directory>
<targetPath>/ru/yanygin/clusterAdminLibraryUI</targetPath>
<targetPath>${basedir}/target/classes/ru/yanygin/clusterAdminLibraryUI</targetPath>
<includes>
<include>**/*.properties</include>
</includes>
Expand Down
6 changes: 6 additions & 0 deletions lib/install-libs-lin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mvn install:install-file -Dfile=com._1c.v8.core-1.0.30-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.core -Dversion=1.0.30-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=com._1c.v8.ibis.admin-1.6.7.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis.admin -Dversion=1.6.7 -Dpackaging=jar
mvn install:install-file -Dfile=com._1c.v8.ibis.swp-1.1.1-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis.swp -Dversion=1.1.1-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=com._1c.v8.ibis-1.1.1-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.ibis -Dversion=1.1.1-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=com._1c.v8.swp.netty-1.0.3-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.swp.netty -Dversion=1.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile=com._1c.v8.swp-1.0.3-SNAPSHOT.jar -DgroupId=com._1c.v8 -DartifactId=com._1c.v8.swp -Dversion=1.0.3-SNAPSHOT -Dpackaging=jar
File renamed without changes.

0 comments on commit f146c11

Please sign in to comment.