Skip to content

Remove install native dependencies #17

Remove install native dependencies

Remove install native dependencies #17

Workflow file for this run

# This file was generated using Kotlin DSL (.github/workflows/src.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Build'
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
jobs:
build:
name: '${{ matrix.name }}'
runs-on: '${{ matrix.runsOn }}'
strategy:
fail-fast: false
matrix:
id:
- 'windows'
- 'ubuntu-x64'
- 'macos-x64'
- 'macos-aarch64'
include:
- arch: 'x64'
buildAnitorrent: true
buildAnitorrentSeparately: false
buildIosFramework: false
composeResourceTriple: 'windows-x64'
extraGradleArgs: []
gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DBoost_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "--parallel"'
id: 'windows'
installNativeDeps: false
name: 'Windows x86_64'
os: 'windows'
runTests: true
runsOn:
- 'self-hosted'
- 'Windows'
- 'X64'
selfHosted: true
uploadApk: false
uploadDesktopInstallers: true
- arch: 'x64'
buildAnitorrent: false
buildAnitorrentSeparately: false
buildIosFramework: false
composeResourceTriple: 'linux-x64'
extraGradleArgs: []
gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g"'
id: 'ubuntu-x64'
installNativeDeps: true
name: 'Ubuntu x86_64'
os: 'ubuntu'
runTests: false
runsOn:
- 'ubuntu-20.04'
selfHosted: false
uploadApk: false
uploadDesktopInstallers: false
- arch: 'x64'
buildAnitorrent: true
buildAnitorrentSeparately: true
buildIosFramework: false
composeResourceTriple: 'macos-x64'
extraGradleArgs: []
gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g"'
id: 'macos-x64'
installNativeDeps: true
name: 'macOS x86_64'
os: 'macos'
runTests: true
runsOn:
- 'macos-13'
selfHosted: false
uploadApk: true
uploadDesktopInstallers: true
- arch: 'aarch64'
buildAnitorrent: true
buildAnitorrentSeparately: true
buildIosFramework: false
composeResourceTriple: 'macos-arm64'
extraGradleArgs: []
gradleArgs: '"--scan" "--no-configuration-cache" "-Porg.gradle.daemon.idletimeout=60000" "-Pkotlin.native.ignoreDisabledTargets=true" "-Dfile.encoding=UTF-8" "-Dani.enable.anitorrent=true" "-DCMAKE_BUILD_TYPE=Release" "-Dorg.gradle.jvmargs=-Xmx4g" "-Dkotlin.daemon.jvm.options=-Xmx4g" "--parallel"'
id: 'macos-aarch64'
installNativeDeps: false
name: 'macOS AArch64'
os: 'macos'
runTests: true
runsOn:
- 'self-hosted'
- 'macOS'
- 'ARM64'
selfHosted: true
uploadApk: true
uploadDesktopInstallers: true
steps:
- id: 'step-0'
uses: 'actions/checkout@v4'
with:
submodules: 'recursive'
- id: 'step-1'
name: 'Resolve JBR location'
run: |-
# Expand jbrLocationExpr
jbr_location_expr=$(eval echo ${{ runner.tool_cache }}/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz)
echo "jbrLocation=$jbr_location_expr" >> $GITHUB_OUTPUT
if: '${{ ((matrix.os == ''macos'')) && ((matrix.arch == ''aarch64'')) }}'
- id: 'step-2'
name: 'Get JBR 21 for macOS AArch64'
env:
jbrLocation: '${{ steps.step-1.outputs.jbrLocation }}'
run: |-
jbr_location="$jbrLocation"
checksum_url="https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz.checksum"
checksum_file="checksum.tmp"
wget -q -O $checksum_file $checksum_url
expected_checksum=$(awk '{print $1}' $checksum_file)
file_checksum=""
if [ -f "$jbr_location" ]; then
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}')
fi
if [ "$file_checksum" != "$expected_checksum" ]; then
wget -q --tries=3 https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_jcef-21.0.5-osx-aarch64-b631.8.tar.gz -O "$jbr_location"
file_checksum=$(shasum -a 512 "$jbr_location" | awk '{print $1}')
fi
if [ "$file_checksum" != "$expected_checksum" ]; then
echo "Checksum verification failed!" >&2
rm -f $checksum_file
exit 1
fi
rm -f $checksum_file
file "$jbr_location"
if: '${{ ((matrix.os == ''macos'')) && ((matrix.arch == ''aarch64'')) }}'
- id: 'step-3'
name: 'Setup JBR 21 for macOS AArch64'
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d'
with:
java-version: '21'
distribution: 'jdkfile'
jdkFile: '${{ steps.step-1.outputs.jbrLocation }}'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
if: '${{ ((matrix.os == ''macos'')) && ((matrix.arch == ''aarch64'')) }}'
- id: 'step-4'
name: 'Setup JBR 21 for other OS'
uses: 'gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d'
with:
java-version: '21'
distribution: 'jetbrains'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
if: '${{ !(((matrix.os == ''macos'')) && ((matrix.arch == ''aarch64''))) }}'
- id: 'step-5'
run: 'echo "jvm.toolchain.version=21" >> local.properties'
- id: 'step-6'
name: 'Setup vcpkg cache'
uses: 'actions/github-script@v7'
with:
script: |-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
if: '${{ ((matrix.os == ''windows'')) && (matrix.installNativeDeps) }}'
- id: 'step-7'
run: 'chmod -R 777 .'
if: '${{ ((matrix.os == ''ubuntu'')) || ((matrix.os == ''macos'')) }}'
- id: 'step-8'
name: 'Setup Gradle'
uses: 'gradle/actions/setup-gradle@v3'
with:
cache-disabled: 'true'
- id: 'step-9'
name: 'Clean and download dependencies'
uses: 'nick-fields/retry@v2'
with:
timeout_minutes: '60'
max_attempts: '3'
command: './gradlew ${{ matrix.gradleArgs }}'
- id: 'step-10'
name: 'Compile Kotlin'
run: './gradlew assemble ${{ matrix.gradleArgs }}'
- id: 'step-11'
name: 'Check'
uses: 'nick-fields/retry@v2'
with:
timeout_minutes: '60'
max_attempts: '2'
command: './gradlew check ${{ matrix.gradleArgs }}'
if: '${{ matrix.runTests }}'