Build Yogurt Native Executables #15
This file contains hidden or 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 Yogurt Native Executables | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: mingwX64 | |
| task: linkReleaseExecutableMingwX64 | |
| platform: windows-x64 | |
| ext: .exe | |
| dynamic-lib-prefix: '' | |
| dynamic-lib-ext: .dll | |
| - target: macosArm64 | |
| task: linkReleaseExecutableMacosArm64 | |
| platform: macos-arm64 | |
| ext: .kexe | |
| dynamic-lib-prefix: lib | |
| dynamic-lib-ext: .dylib | |
| - target: linuxX64 | |
| task: linkReleaseExecutableLinuxX64 | |
| platform: linux-x64 | |
| ext: .kexe | |
| dynamic-lib-prefix: lib | |
| dynamic-lib-ext: .so | |
| - target: linuxArm64 | |
| task: linkReleaseExecutableLinuxArm64 | |
| platform: linux-arm64 | |
| ext: .kexe | |
| dynamic-lib-prefix: lib | |
| dynamic-lib-ext: .so | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Cache gradle dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/libs.versions.toml') }} | |
| - name: Cache konan | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.konan | |
| key: ${{ runner.os }}-konan-${{ matrix.target }}-${{ hashFiles('**/gradle/libs.versions.toml') }} | |
| - name: Setup JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Build Yogurt for ${{ matrix.target }} | |
| run: ./gradlew :yogurt:${{ matrix.task }} | |
| - name: Copy artifacts | |
| run: | | |
| mkdir -p artifacts/lib/${{ matrix.platform }} | |
| cp ./yogurt/build/bin/${{ matrix.target }}/releaseExecutable/yogurt${{ matrix.ext }} artifacts/ | |
| cp ./yogurt-media-codec/lib/${{ matrix.platform }}/${{ matrix.dynamic-lib-prefix }}lagrangecodec${{ matrix.dynamic-lib-ext }} artifacts/lib/${{ matrix.platform }}/ | |
| - name: Upload ${{ matrix.target }} executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: yogurt-${{ matrix.platform }} | |
| path: artifacts/** |