Merge branch 'release/0.6.1' #305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
[push] | |
jobs: | |
linux-amd64: | |
name: Test jfuse-linux-amd64 | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 21-ea | |
distribution: 'zulu' | |
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="/lib/x86_64-linux-gnu/libfuse3.so.3" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-linux-amd64 | |
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml | |
retention-days: 3 | |
mac: | |
name: Test jfuse-mac | |
runs-on: macos-12 | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 21-ea | |
distribution: 'zulu' | |
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" | |
- uses: actions/upload-artifact@v3 | |
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 | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 21-ea | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Setup fuse | |
run: choco install winfsp --version 1.12.22339 -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" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-win | |
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml | |
retention-days: 3 | |
sonarcloud: | |
name: Run SonarCloud Analysis | |
needs: [linux-amd64, mac, win] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 21-ea | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-linux-amd64 | |
path: coverage/linux-amd64 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-mac | |
path: coverage/mac | |
- uses: actions/download-artifact@v3 | |
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 | |
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 |