-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e15176
commit 7470d29
Showing
104 changed files
with
3,427 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
max_line_length = 100 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Be reasonable and respectful. This repository, discussions within and artifacts derived from it are | ||
freely available, but it is still expected that you act within reasonable boundaries, whether you | ||
are a source contributor or not. | ||
|
||
The owners reserve the right to impose temporary and/or permanent restrictions against particular | ||
users on this repository as well as any others under the same ownership if deemed necessary. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Bug Report | ||
description: Report a bug in the project | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
**Please include:** | ||
* Clear reproduction steps. | ||
* Frequency with which the steps above reproduce the bug (if not 100%). | ||
* Expected result(s) of the reproduction steps, as well as the actual ones. | ||
Detailed reports are more likely to be addressed faster. | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Feature request | ||
description: Request new functionality | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Question | ||
description: If you have any doubts, just ask | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Security vulnerability | ||
description: Report a vulnerability on any versions of the tool | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: What versions is this vulnerability observed on? | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
No pre-defined structure is enforced, but descriptive PRs are likely to be | ||
attended earlier. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Report vulnerabilities as vulnerability-type issues. | ||
|
||
Find vulnerabilities as [issues with the `vulnerability` label]( | ||
https://github.com/tidal-music/network-time/issues?q=is%3Aissue+is%3Aopen+label%3Avulnerability). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Build Library XcFramework and attach it and its checksum to the requested release | ||
description: Only if it is not attached already | ||
inputs: | ||
target: | ||
description: The release to attach to | ||
required: true | ||
xcodeversion: | ||
description: The Xcode version to configure before compiling | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
set +e | ||
curl -ILs --fail https://github.com/$GITHUB_REPOSITORY/releases/download/${{ inputs.target }}/Library-${{ inputs.target }}-xcodebuild-${{ inputs.xcodeversion }}.xcframework.zip | ||
echo ATTACHMENT_MISSING_IF_22=$? >> $GITHUB_ENV | ||
shell: bash | ||
- uses: actions/[email protected] | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: ${{ inputs.xcodeversion }} | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
uses: ./.github/actions/runGradleTask | ||
with: | ||
task: :library:assembleLibraryReleaseXCFramework | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: cd library/build/XCFrameworks/release/library.xcframework && zip -r ../../../../../Library.xcframework.zip . | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: | | ||
echo UPLOAD_URL=$(curl -sL \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/"${GITHUB_REPOSITORY}"/releases/latest \ | ||
| jq -r .upload_url) >> $GITHUB_ENV | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: echo UPLOAD_URL_LIBRARY=$(echo $UPLOAD_URL | sed "s/{?name,label}/?name=Library-${{ inputs.target }}-xcodebuild-${{ inputs.xcodeversion }}.xcframework.zip/") >> $GITHUB_ENV | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: | | ||
curl -s \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
--data-binary "@Library.xcframework.zip" \ | ||
$UPLOAD_URL_LIBRARY | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: echo $(swift package compute-checksum Library.xcframework.zip) > checksum | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: echo UPLOAD_URL_CHECKSUM=$(echo $UPLOAD_URL | sed "s/{?name,label}/?name=Library-${{ inputs.target }}-xcodebuild-${{ matrix.xcodeversion }}.xcframework.zip.checksum/") >> $GITHUB_ENV | ||
shell: bash | ||
- if: ${{ env.ATTACHMENT_MISSING_IF_22 == '22' }} | ||
run: | | ||
curl -s \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
--data-binary "@checksum" \ | ||
$UPLOAD_URL_CHECKSUM | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Setup Gradle and run a task on all modules that have it | ||
description: Includes setting up JDK | ||
inputs: | ||
task: | ||
description: The task to run | ||
required: true | ||
preTaskString: | ||
description: A String to pass to the Gradle invocation before the task. This can be used for example to pass properties | ||
required: false | ||
default: "" | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: gradle | ||
- run: ./gradlew ${{ inputs.preTaskString }} ${{ inputs.task }} | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
generate-build-matrix: | ||
runs-on: macos-14-xlarge | ||
outputs: | ||
xcodeversions: ${{ steps.generate.outputs.xcodeversions }} | ||
steps: | ||
- id: generate | ||
run: | | ||
version_list=() | ||
for XCODE_INSTALL in $(ls /Applications | grep Xcode); do | ||
version_list+=("$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" /Applications/$XCODE_INSTALL/Contents/Info.plist)") | ||
done | ||
unique_version_list=( $(printf "%s\n" ${version_list[@]} | sort -n -u) ) | ||
jsonString="$(jq -c --null-input '$ARGS.positional' --args -- "${unique_version_list[@]}")" | ||
echo "xcodeversions=$jsonString" >> $GITHUB_OUTPUT | ||
build: | ||
runs-on: macos-14-xlarge | ||
needs: [ generate-build-matrix ] | ||
strategy: | ||
matrix: | ||
xcodeversion: ${{ fromJSON(needs.generate-build-matrix.outputs.xcodeversions) }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: ${{ matrix.xcodeversion }} | ||
- uses: ./.github/actions/runGradleTask | ||
with: | ||
task: build | ||
barrier-build: | ||
runs-on: ubuntu-22.04 | ||
needs: [ build ] | ||
steps: | ||
- run: exit 0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Compile and attach latest release with all targets | ||
on: | ||
schedule: | ||
- cron: '0 0 * * FRI' | ||
permissions: | ||
contents: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
jobs: | ||
lookup-latest-github-release: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
target: ${{ steps.lookup.outputs.target }} | ||
steps: | ||
- id: lookup | ||
run: | | ||
echo "target=$(curl -L \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq --raw-output '.name')" >> $GITHUB_OUTPUT | ||
generate-build-matrix: | ||
runs-on: macos-14-xlarge | ||
outputs: | ||
xcodeversions: ${{ steps.generate.outputs.xcodeversions }} | ||
steps: | ||
- id: generate | ||
run: | | ||
version_list=() | ||
for XCODE_INSTALL in $(ls /Applications | grep Xcode); do | ||
version_list+=("$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" /Applications/$XCODE_INSTALL/Contents/Info.plist)") | ||
done | ||
unique_version_list=( $(printf "%s\n" ${version_list[@]} | sort -n -u) ) | ||
jsonString="$(jq -c --null-input '$ARGS.positional' --args -- "${unique_version_list[@]}")" | ||
echo "xcodeversions=$jsonString" >> $GITHUB_OUTPUT | ||
attach-xcframework-to-github-release: | ||
runs-on: macos-14-xlarge | ||
needs: [ lookup-latest-github-release, generate-build-matrix ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xcodeversion: ${{ fromJSON(needs.generate-build-matrix.outputs.xcodeversions) }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/attachXcFrameworkAndChecksum | ||
with: | ||
target: ${{ needs.lookup-latest-github-release.outputs.target }} | ||
xcodeversion: ${{ matrix.xcodeversion }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Submit dependencies | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
library: | ||
runs-on: macos-14-xlarge | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: gradle | ||
- run: .scripts/dependency_report_generate.sh -m library -c allSourceSetsCompileDependenciesMetadata > dependencies_library_raw | ||
- run: .scripts/github/dependency_report_as_github_json.sh -i dependencies_library_raw -n library -s $(TZ=UTC date +"%Y-%m-%dT%H:%M:%SZ") -l library/build.gradle.kts > dependencies_library.github.json | ||
- run: | | ||
echo RESPONSE_CODE=$(curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/$GITHUB_REPOSITORY/dependency-graph/snapshots \ | ||
--data-binary "@dependencies_library.github.json" \ | ||
-o /dev/null \ | ||
-w '%{http_code}') >> $GITHUB_ENV | ||
- run: | | ||
if [[ "$RESPONSE_CODE" == "201" ]]; | ||
then | ||
exit 0 | ||
else | ||
echo "Dependency submission failed with HTTP code $RESPONSE_CODE" | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- '**' | ||
permissions: | ||
contents: write | ||
packages: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
concurrency: | ||
group: ${{ github.ref_name }} | ||
jobs: | ||
ensure-tag-is-on-main: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
- run: exit $(git merge-base --is-ancestor $GITHUB_REF_NAME HEAD) | ||
jvm-maven-github: | ||
runs-on: macos-14-xlarge | ||
needs: [ ensure-tag-is-on-main ] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/runGradleTask | ||
with: | ||
preTaskString: -Pversion=$GITHUB_REF_NAME | ||
task: library:publishJvmPublicationToGithubPackagesRepository | ||
create-github-release: | ||
runs-on: ubuntu-22.04 | ||
needs: [ ensure-tag-is-on-main ] | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: .scripts/github/release.sh > upload_url | ||
- uses: actions/[email protected] | ||
with: | ||
name: upload_url | ||
path: upload_url | ||
generate-build-matrix: | ||
runs-on: macos-14-xlarge | ||
needs: [ ensure-tag-is-on-main ] | ||
outputs: | ||
xcodeversions: ${{ steps.generate.outputs.xcodeversions }} | ||
steps: | ||
- id: generate | ||
run: | | ||
version_list=() | ||
for XCODE_INSTALL in $(ls /Applications | grep Xcode); do | ||
version_list+=("$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" /Applications/$XCODE_INSTALL/Contents/Info.plist)") | ||
done | ||
unique_version_list=( $(printf "%s\n" ${version_list[@]} | sort -n -u) ) | ||
jsonString="$(jq -c --null-input '$ARGS.positional' --args -- "${unique_version_list[@]}")" | ||
echo "xcodeversions=$jsonString" >> $GITHUB_OUTPUT | ||
attach-xcframework-to-github-release: | ||
runs-on: macos-14-xlarge | ||
needs: [ create-github-release, generate-build-matrix ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xcodeversion: ${{ fromJSON(needs.generate-build-matrix.outputs.xcodeversions) }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/attachXcFrameworkAndChecksum | ||
with: | ||
target: ${{ github.ref_name }} | ||
xcodeversion: ${{ matrix.xcodeversion }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Static analysis | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
ktlint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: .scripts/check_ktlint.sh | ||
codeql: | ||
runs-on: macos-14-xlarge | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: github/codeql-action/[email protected] | ||
with: | ||
languages: kotlin | ||
- uses: ./.github/actions/runGradleTask | ||
with: | ||
task: build | ||
- uses: github/codeql-action/[email protected] | ||
with: | ||
category: "/language:kotlin" | ||
|
Oops, something went wrong.