-
-
Notifications
You must be signed in to change notification settings - Fork 6
145 lines (139 loc) · 4.53 KB
/
Copy pathbuild.yml
File metadata and controls
145 lines (139 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Build
on:
push:
pull_request_target:
types: [labeled]
env:
JAVA_DIST: 'temurin'
JAVA_VERSION: '24'
jobs:
linux:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-24.04-arm
arch: aarch64
runs-on: ${{ matrix.os }}
name: Test jfuse-linux-${{ matrix.arch }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DIST }}
cache: 'maven'
- name: Setup fuse
run: |
sudo apt-get update
sudo apt-get install fuse3 libfuse3-dev
- name: Maven build
run: mvn -B verify -Dfuse.lib.path="/usr/lib/${{ matrix.arch }}-linux-gnu/libfuse3.so.3" --no-transfer-progress
- uses: actions/upload-artifact@v4
with:
name: coverage-linux-${{ matrix.arch }}
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml
retention-days: 3
mac:
name: Test jfuse-mac
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DIST }}
cache: 'maven'
- name: Setup fuse
run: |
brew tap macos-fuse-t/homebrew-cask
brew update
brew install fuse-t
- name: Maven build
run: mvn -B verify -Dfuse.lib.path="/usr/local/lib/libfuse-t.dylib" --no-transfer-progress
- uses: actions/upload-artifact@v4
with:
name: coverage-mac
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml
retention-days: 3
win:
name: Test jfuse-win
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DIST }}
cache: 'maven'
- name: Setup fuse
run: choco install winfsp --version 2.0.23075 -y
- name: Maven build
shell: bash # surprise, running maven in pwsh is crappy, see https://stackoverflow.com/q/6347985/4014509
run: mvn -B verify -Dfuse.lib.path="C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll" --no-transfer-progress
- uses: actions/upload-artifact@v4
with:
name: coverage-win
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml
retention-days: 3
sonarcloud:
name: Run SonarCloud Analysis
needs: [linux, mac, win]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DIST }}
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- uses: actions/download-artifact@v5
with:
name: coverage-linux-x86_64
path: coverage/linux-x86_64
- uses: actions/download-artifact@v5
with:
name: coverage-linux-aarch64
path: coverage/linux-aarch64
- uses: actions/download-artifact@v5
with:
name: coverage-mac
path: coverage/mac
- uses: actions/download-artifact@v5
with:
name: coverage-win
path: coverage/win
- name: Analyze
run: >
mvn -B compile -DskipTests
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=cryptomator_jfuse
-Dsonar.coverage.jacoco.xmlReportPaths=${GITHUB_WORKSPACE}/coverage/**/jacoco.xml
-Dsonar.organization=cryptomator
-Dsonar.host.url=https://sonarcloud.io
--no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
release:
needs: [ sonarcloud ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: actions/create-release@v1 #REMARK: action/create-release is unmaintend
env:
GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
prerelease: true