File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will:
2
+ # - compile game on windows, linux, macos
3
+ # - run game sonar on linux
4
+
5
+ name : Build
6
+
7
+ on :
8
+ push :
9
+ branches : [ master ]
10
+ pull_request :
11
+ branches : [ master ]
12
+
13
+ jobs :
14
+ build :
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ os : [ubuntu-latest, windows-latest, macos-latest]
19
+ jdk : [17]
20
+ runs-on : ${{ matrix.os }}
21
+ env :
22
+ JDK_VERSION : ${{ matrix.jdk }}
23
+ AUDIODEV : " null"
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4.1.1
28
+ with :
29
+ fetch-depth : 0
30
+
31
+ - name : Cache
32
+ uses : actions/cache@v3.3.2
33
+ with :
34
+ path : ~/.m2/repository
35
+ key : maven-${{ matrix.os }}-java${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
36
+ restore-keys : |
37
+ maven-${{ matrix.os }}-java${{ matrix.jdk }}-
38
+ maven-${{ matrix.os }}-
39
+
40
+ - name : Maven
41
+ uses : stCarolas/setup-maven@v4.5
42
+ with :
43
+ maven-version : 3.9.6
44
+
45
+ - name : JDK
46
+ uses : actions/setup-java@v4.0.0
47
+ with :
48
+ java-version : |
49
+ ${{ matrix.jdk }}
50
+ distribution : ' temurin'
51
+ mvn-toolchain-id : |
52
+ JavaSE-17
53
+
54
+ - name : Compile windows
55
+ if : matrix.os == 'windows-latest'
56
+ uses : coactions/setup-xvfb@v1.0.1
57
+ with :
58
+ run : mvn clean install --file tyrian-parent/pom.xml -U -Pall
59
+
60
+ - name : Compile macos
61
+ if : matrix.os == 'macos-latest'
62
+ uses : coactions/setup-xvfb@v1.0.1
63
+ with :
64
+ run : mvn clean install --file tyrian-parent/pom.xml -U -Pall
65
+
66
+ - name : Sonar ubuntu
67
+ if : matrix.os == 'ubuntu-latest'
68
+ uses : coactions/setup-xvfb@v1.0.1
69
+ with :
70
+ run : mvn clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file tyrian-parent/pom.xml -U -Pall -Dsonar.organization=b3dgs -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.projectKey=b3dgs_tyrian-remake
You can’t perform that action at this time.
0 commit comments