Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Oct 19, 2022
2 parents b1b04df + 661ae25 commit e8524e1
Show file tree
Hide file tree
Showing 94 changed files with 3,984 additions and 617 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
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@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
Expand All @@ -20,8 +20,8 @@ jobs:
sudo apt-get update
sudo apt-get install fuse3 libfuse3-dev
- name: Maven build
run: mvn -B verify -Plinux-amd64
- uses: actions/upload-artifact@v2
run: mvn -B verify
- uses: actions/upload-artifact@v3
with:
name: coverage-linux-amd64
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml
Expand All @@ -32,79 +32,78 @@ jobs:
runs-on: macos-10.15
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
cache: 'maven'
- name: Setup fuse
run: brew install macfuse
- name: Maven build
run: mvn -B verify -Pmac
- uses: actions/upload-artifact@v2
run: mvn -B verify
- uses: actions/upload-artifact@v3
with:
name: coverage-mac
path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml
retention-days: 3

win-amd64:
name: Test jfuse-win-amd64
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@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
cache: 'maven'
- name: Setup fuse
run: choco install winfsp --version 1.10.22006 -y
- name: Maven build
run: mvn -B verify -Pwin-amd64
- uses: actions/upload-artifact@v2
run: mvn -B verify
- uses: actions/upload-artifact@v3
with:
name: coverage-win-amd64
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-amd64]
needs: [linux-amd64, mac, win]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: coverage-linux-amd64
path: coverage/linux-amd64
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: coverage-mac
path: coverage/mac
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: coverage-win-amd64
path: coverage/win-amd64
name: coverage-win
path: coverage/win
- name: Analyze
run: >
mvn -B compile -DskipTests
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Plinux-amd64,linux-aarch64,mac,win-amd64
-Dsonar.projectKey=cryptomator_jfuse
-Dsonar.coverage.jacoco.xmlReportPaths=${GITHUB_WORKSPACE}/coverage/**/jacoco.xml
-Dsonar.organization=cryptomator
Expand All @@ -119,7 +118,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: actions/create-release@v1
uses: actions/create-release@v1 #REMARK: action/create-release is unmaintend
env:
GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: "refs/tags/${{ github.event.inputs.tag }}"
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Enforce project version ${{ github.event.inputs.tag }}
run: mvn versions:set -B -DnewVersion=${{ github.event.inputs.tag }}
- name: Deploy
run: mvn deploy -B -DskipTests -Psign,deploy-central,linux-amd64,linux-aarch64,mac,win-amd64 --no-transfer-progress
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'zulu'
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Enforce project version ${{ github.event.release.tag_name }}
run: mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
- name: Deploy
run: mvn deploy -B -DskipTests -Psign,deploy-github,linux-amd64,linux-aarch64,mac,win-amd64 --no-transfer-progress
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
Expand Down
5 changes: 3 additions & 2 deletions .idea/runConfigurations/RandomFileSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/WindowsMirrorFileSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![Build](https://github.com/cryptomator/jfuse/actions/workflows/build.yml/badge.svg)](https://github.com/cryptomator/jfuse/actions/workflows/build.yml)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=cryptomator_jfuse&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=cryptomator_jfuse)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=cryptomator_jfuse&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=cryptomator_jfuse)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cryptomator_jfuse&metric=coverage)](https://sonarcloud.io/summary/new_code?id=cryptomator_jfuse)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cryptomator_jfuse&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cryptomator_jfuse)

# jFUSE
Expand Down Expand Up @@ -31,25 +34,25 @@ Not all [`fuse_operations`](https://libfuse.github.io/doxygen/structfuse__operat
| rename | :white_check_mark: |
| link | :x: |
| chmod | :white_check_mark: |
| chown | :x: |
| chown | :white_check_mark: |
| truncate | :white_check_mark: |
| ~ftruncate~ | use truncate |
| ~utime~ | use utimens |
| open | :white_check_mark: |
| read | :white_check_mark: |
| write | :white_check_mark: |
| statfs | :white_check_mark: |
| flush | :x: |
| flush | :white_check_mark: |
| release | :white_check_mark: |
| fsync | :x: |
| fsync | :white_check_mark: |
| setxattr | :x: |
| getxattr | :x: |
| listxattr | :x: |
| removexattr | :x: |
| opendir | :white_check_mark: |
| readdir | :white_check_mark: |
| releasedir | :white_check_mark: |
| fsyncdir | :x: |
| fsyncdir | :white_check_mark: |
| init | :white_check_mark: |
| destroy | :white_check_mark: |
| access | :white_check_mark: (ignored on Windows) |
Expand All @@ -70,6 +73,14 @@ Not all [`fuse_operations`](https://libfuse.github.io/doxygen/structfuse__operat

Usage examples can be found under [`/jfuse-examples/`](jfuse-examples). You basically need to implement `FuseOperations` and pass it to the `Fuse.builder()`:

```xml
<dependency>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse</artifactId>
<version>x.y.z</version>
</dependency>
```

```java
var builder = Fuse.builder();
var fs = new MyFileSystem(builder.errno());
Expand All @@ -92,10 +103,10 @@ java -p path/to/mods \

Due to slight differences in memory layout, each platform needs its own implementation. Currently, the following operating systems and architectures are supported:

| | Linux | Mac (macFUSE) | Windows (WinFSP) |
|--------|--------------------------------------------|--------------------------|--------------------------------------|
| x86_64 | [jfuse-linux-amd64](jfuse-linux-amd64) | [jfuse-mac](jfuse-mac) | [jfuse-win-amd64](jfuse-win-amd64) |
| arm64 | [jfuse-linux-aarch64](jfuse-linux-aarch64) | [jfuse-mac](jfuse-mac) | |
| | Linux | Mac (macFUSE) | Windows (WinFSP) |
|--------|--------------------------------------------|--------------------------|------------------------|
| x86_64 | [jfuse-linux-amd64](jfuse-linux-amd64) | [jfuse-mac](jfuse-mac) | [jfuse-win](jfuse-win) |
| arm64 | [jfuse-linux-aarch64](jfuse-linux-aarch64) | [jfuse-mac](jfuse-mac) | [jfuse-win](jfuse-win) |

## Building

Expand All @@ -109,7 +120,7 @@ Each platform has its own module. In rare cases, we need to update jextracted cl

In most cases this requires you to run the build on the target platform, as you need access to its system-specific header files and (most likely) build tools. See module readme for specific requirements.

In order to run `jextract`, use the corresponding Maven profile (`-Pjextract`).
In order to run `jextract`, use the corresponding Maven profile (e.g. `-Pjextract-win`).

### Adding a new platform

Expand Down
4 changes: 2 additions & 2 deletions jfuse-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse</artifactId>
<version>0.2.1</version>
<artifactId>jfuse-parent</artifactId>
<version>0.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-api</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions jfuse-api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

/**
* Defines the API to create a FUSE file system in Java.
*
* @uses FuseBuilder FUSE builder to build FUSE file system instances
*/
module org.cryptomator.jfuse.api {
requires static org.jetbrains.annotations;
Expand Down
3 changes: 1 addition & 2 deletions jfuse-api/src/main/java/org/cryptomator/jfuse/api/Fuse.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import org.jetbrains.annotations.Blocking;
import org.jetbrains.annotations.BlockingExecutor;
import org.jetbrains.annotations.MustBeInvokedByOverriders;

import java.lang.foreign.MemorySession;
Expand Down Expand Up @@ -47,7 +46,7 @@ public static FuseBuilder builder() {
/**
* Mounts this fuse file system at the given mount point.
* <p>
* This method blocks until either {@link FuseOperations#init(FuseConnInfo)} completes or an error occurs.
* This method blocks until either {@link FuseOperations#init(FuseConnInfo, FuseConfig)} completes or an error occurs.
*
* @param progName The program name used to construct a usage message and to derive a fallback for <code>-ofsname=...</code>
* @param mountPoint mount point
Expand Down
Loading

0 comments on commit e8524e1

Please sign in to comment.