diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..60f4d845 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: [overheadhunter, cryptomator] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d0e6215d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,128 @@ +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@v2 + - uses: actions/setup-java@v2 + with: + java-version: 19-ea + distribution: 'zulu' + cache: 'maven' + - name: Setup fuse + run: | + sudo apt-get update + sudo apt-get install fuse libfuse-dev + - name: Maven build + run: mvn -B verify -Plinux-amd64 + - uses: actions/upload-artifact@v2 + 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-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 + with: + java-version: 19-ea + distribution: 'zulu' + cache: 'maven' + - name: Setup fuse + run: brew install macfuse + - name: Maven build + run: mvn -B verify -Pmac + - uses: actions/upload-artifact@v2 + with: + name: coverage-mac + path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml + retention-days: 3 + + win-amd64: + name: Test jfuse-win-amd64 + 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 + with: + java-version: 19-ea + 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 + with: + name: coverage-win-amd64 + path: jfuse-tests/target/site/jacoco-aggregate/jacoco.xml + retention-days: 3 + + sonarcloud: + name: Run SonarCloud Analysis + needs: [linux-amd64, mac, win-amd64] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-java@v2 + with: + java-version: 19-ea + distribution: 'zulu' + cache: 'maven' + - name: Cache SonarCloud packages + uses: actions/cache@v2 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - uses: actions/download-artifact@v2 + with: + name: coverage-linux-amd64 + path: coverage/linux-amd64 + - uses: actions/download-artifact@v2 + with: + name: coverage-mac + path: coverage/mac + - uses: actions/download-artifact@v2 + with: + name: coverage-win-amd64 + path: coverage/win-amd64 + - 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 + -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 + env: + GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot" + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + prerelease: true diff --git a/.github/workflows/publish-central.yml b/.github/workflows/publish-central.yml new file mode 100644 index 00000000..aa481b95 --- /dev/null +++ b/.github/workflows/publish-central.yml @@ -0,0 +1,33 @@ +name: Publish to Maven Central +on: + workflow_dispatch: + inputs: + tag: + description: 'Tag' + required: true + default: '0.0.0' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: "refs/tags/${{ github.event.inputs.tag }}" + - uses: actions/setup-java@v2 + with: + java-version: 19-ea + distribution: 'zulu' + cache: 'maven' + server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml + server-username: MAVEN_USERNAME # env variable for username in deploy + server-password: MAVEN_PASSWORD # env variable for token in deploy + gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase + - 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 + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml new file mode 100644 index 00000000..63f46f8b --- /dev/null +++ b/.github/workflows/publish-github.yml @@ -0,0 +1,36 @@ +name: Publish to GitHub Packages +on: + release: + types: [published] +jobs: + publish: + 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 + with: + java-version: 19-ea + distribution: 'zulu' + cache: 'maven' + gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase + - 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 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_USERNAME: 'Cryptobot' + SLACK_ICON: + SLACK_ICON_EMOJI: ':bot:' + SLACK_CHANNEL: 'cryptomator-desktop' + SLACK_TITLE: "Published ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}" + SLACK_MESSAGE: "Ready to ." + SLACK_FOOTER: + MSG_MINIMAL: true diff --git a/.gitignore b/.gitignore index 872d38f0..7496fc9f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,8 @@ pom.xml.versionsBackup .idea/**/workspace.xml .idea/**/tasks.xml .idea/dictionaries +.idea/compiler.xml +.idea/encodings.xml +.idea/jarRepositories.xml .idea/**/libraries/ *.iml diff --git a/.gitmodules b/.gitmodules index 4b48d0d5..c16f993b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,8 @@ path = libfuse url = https://github.com/libfuse/libfuse.git branch = fuse-2_9_bugfix + +[submodule "winfsp"] + path = winfsp + url = https://github.com/billziss-gh/winfsp.git + branch = master \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 00000000..dbf56047 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 00000000..79ee123c --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 8c8e8619..00000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..146ab09b --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 318711de..08abb3bb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file diff --git a/.idea/runConfigurations/HelloFileSystem.xml b/.idea/runConfigurations/HelloJnrFileSystem.xml similarity index 56% rename from .idea/runConfigurations/HelloFileSystem.xml rename to .idea/runConfigurations/HelloJnrFileSystem.xml index 3ce482d6..0e5d0cf9 100644 --- a/.idea/runConfigurations/HelloFileSystem.xml +++ b/.idea/runConfigurations/HelloJnrFileSystem.xml @@ -1,8 +1,8 @@ - -