fork/oculante
git clone https://git.julia.blue/fork/oculante
3ccf95f
0.9.2
1name : Release 2 3on : 4push : 5tags : 6- "*" 7 8env : 9CARGO_TERM_COLOR : always 10MACOS_DEPLOYMENT_TARGET : 10.15 11 12jobs : 13release_job : 14name : Create release 15runs-on : ubuntu-20.04 16outputs : 17upload_url : ${{ steps.create_release.outputs.upload_url }} 18release_id : ${{ steps.create_release.outputs.id }} 19steps : 20- uses : actions/checkout@v4 21with : 22fetch-depth : '0' 23- name : Install kokai 24run : cargo install kokai 25- name : Make changelog 26run : kokai release --ref ${{ github.ref }} > changes 27- name : Create release 28id : create_release 29uses : actions/create-release@v1 30env : 31GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 32with : 33tag_name : ${{ github.ref }} 34release_name : Release ${{ github.ref }} 35draft : true 36body_path : ./changes 37 38build_job : 39name : Build release 40needs : release_job 41runs-on : ${{ matrix.os }} 42strategy : 43fail-fast : false 44matrix : 45os : [ ubuntu-20.04 , windows-2019 , macos-14 , ubuntu-latest , macos-12 ] 46rust : [ stable ] 47steps : 48- uses : actions/checkout@v4 49- uses : ilammy/setup-nasm@v1 50 51- name : Install latest rust 52run : rustup update 53 54- name : Install cargo cross 55run : cargo install cross 56if : matrix.os == 'ubuntu-latest' 57 58- name : Cross-compile armv7 59run : | 60cross build --release --target armv7-unknown-linux-gnueabihf --no-default-features --features notan/glsl-to-spirv 61zip -r oculante_armv7_minimal.zip target/armv7-unknown-linux-gnueabihf/release/oculante 62if : matrix.os == 'ubuntu-latest' 63 64- name : Cross-compile arm64 65run : | 66cross build --release --target aarch64-unknown-linux-gnu --no-default-features --features notan/glsl-to-spirv 67zip -r oculante_aarch64_minimal.zip target/aarch64-unknown-linux-gnu/release/oculante 68if : matrix.os == 'ubuntu-latest' 69 70- name : Install cargo bundle 71run : cargo install cargo-bundle 72if : matrix.os == 'macos-12' 73 74 75- name : Install cargo deb 76run : cargo install cargo-deb 77if : matrix.os == 'ubuntu-20.04' 78 79- name : Patch azure linux deps 80run : sudo apt update 81if : matrix.os == 'ubuntu-20.04' 82 83- name : Install libheif for ubuntu 84run : | 85./build_deps_linux.sh 86cd libheif/build && sudo make install 87if : matrix.os == 'ubuntu-20.04' 88 89- name : Update Rust 90run : rustup update 91 92- name : Install linux classic dependencies 93run : sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev libasound2-dev 94if : matrix.os == 'ubuntu-20.04' 95 96- name : Install libheif for Windows 97run : | 98vcpkg integrate install 99vcpkg install libheif:x64-windows-static-md 100vcpkg install libheif:x64-windows-static 101if : matrix.os == 'windows-2019' 102 103- name : Build Windows Application 104run : cargo build --release --features heif --features notan/glsl-to-spirv 105if : matrix.os == 'windows-2019' 106 107 108- name : Build Linux classic Application 109run : | 110cargo build --release --no-default-features --features notan/glsl-to-spirv 111zip -r oculante_linux_minimal.zip target/release/oculante 112cargo build --release 113zip -r oculante_linux.zip target/release/oculante 114cargo deb 115cp target/debian/oculante_*.deb oculante.deb 116if : matrix.os == 'ubuntu-20.04' 117 118 119- name : Build Mac Silicon Bundle 120run : ./build_mac.sh 121if : matrix.os == 'macos-14' 122 123- name : Zip Mac Silicon Bundle 124run : mv target/release/bundle/osx/oculante.app . && zip -r oculante_app.zip oculante.app 125if : matrix.os == 'macos-14' 126 127- name : Build Mac Intel Bundle 128# run: ./build_mac.sh 129run : | 130rustc --version --verbose 131brew install libheif 132cargo install cargo-bundle 133cargo bundle --release --features "notan/shaderc heif" 134otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 135mkdir target/release/bundle/osx/oculante.app/Contents/Frameworks/ 136cp /usr/local/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 137cp /usr/local/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 138cp /usr/local/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 139cp /usr/local/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 140cp /usr/local/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 141cp /usr/local/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/ 142install_name_tool -change /usr/local/opt/libheif/lib/libheif.1.dylib "@executable_path/../Frameworks/libheif.1.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 143install_name_tool -add_rpath "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 144install_name_tool -add_rpath "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 145install_name_tool -add_rpath "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 146install_name_tool -add_rpath "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 147install_name_tool -add_rpath "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 148install_name_tool -change /usr/local/opt/x265/lib/libx265.209.dylib "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib 149install_name_tool -change /usr/local/opt/libde265/lib/libde265.0.dylib "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib 150install_name_tool -change /usr/local/opt/aom/lib/libaom.3.dylib "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib 151install_name_tool -change /usr/local/opt/webp/lib/libsharpyuv.0.dylib "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib 152install_name_tool -change /usr/local/opt/libvmaf/lib/libvmaf.3.dylib "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib 153codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib 154codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib 155codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib 156codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib 157codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib 158codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib 159otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante 160cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist 161if : matrix.os == 'macos-12' 162 163- name : Zip Mac Intel Bundle 164run : mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_intel.zip oculante.app 165if : matrix.os == 'macos-12' 166 167- name : Upload Linux 20.04 Release 168if : matrix.os == 'ubuntu-20.04' 169id : upload-release-asset-lin-classic 170uses : actions/upload-release-asset@v1 171env : 172GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 173with : 174upload_url : ${{ needs.release_job.outputs.upload_url }} 175asset_path : target/release/oculante 176asset_name : oculante_linux 177asset_content_type : application/zip 178 179- name : Upload ARMv7 Release 180if : matrix.os == 'ubuntu-latest' 181id : upload-release-arm 182uses : actions/upload-release-asset@v1 183env : 184GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 185with : 186upload_url : ${{ needs.release_job.outputs.upload_url }} 187asset_path : oculante_armv7_minimal.zip 188asset_name : oculante_linux_armv7_minimal.zip 189asset_content_type : application/zip 190 191- name : Upload ARM64 Release 192if : matrix.os == 'ubuntu-latest' 193id : upload-release-arm64 194uses : actions/upload-release-asset@v1 195env : 196GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 197with : 198upload_url : ${{ needs.release_job.outputs.upload_url }} 199asset_path : oculante_aarch64_minimal.zip 200asset_name : oculante_linux_aarch64_minimal.zip 201asset_content_type : application/zip 202 203- name : Upload Linux 20.04 Release zip 204if : matrix.os == 'ubuntu-20.04' 205id : upload-release-asset-lin-classic-zip 206uses : actions/upload-release-asset@v1 207env : 208GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 209with : 210upload_url : ${{ needs.release_job.outputs.upload_url }} 211asset_path : oculante_linux.zip 212asset_name : oculante_linux.zip 213asset_content_type : application/zip 214 215- name : Upload Linux 20.04 Release minimal zip 216if : matrix.os == 'ubuntu-20.04' 217id : upload-release-asset-lin-classic-zip-min 218uses : actions/upload-release-asset@v1 219env : 220GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 221with : 222upload_url : ${{ needs.release_job.outputs.upload_url }} 223asset_path : oculante_linux_minimal.zip 224asset_name : oculante_linux_minimal.zip 225asset_content_type : application/zip 226 227- name : Upload Linux 20.04 deb 228if : matrix.os == 'ubuntu-20.04' 229id : upload-release-asset-lin-classic-deb 230uses : actions/upload-release-asset@v1 231env : 232GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 233with : 234upload_url : ${{ needs.release_job.outputs.upload_url }} 235asset_path : oculante.deb 236asset_name : oculante-${{ github.ref_name }}.deb 237asset_content_type : application/zip 238 239- name : Upload Mac Release 240if : matrix.os == 'macos-14' 241id : upload-release-asset-mac 242uses : actions/upload-release-asset@v1 243env : 244GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 245with : 246upload_url : ${{ needs.release_job.outputs.upload_url }} 247asset_path : oculante_app.zip 248asset_name : oculante_mac.zip 249asset_content_type : application/zip 250 251- name : Upload Mac Release 252if : matrix.os == 'macos-12' 253id : upload-release-asset-macintel 254uses : actions/upload-release-asset@v1 255env : 256GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 257with : 258upload_url : ${{ needs.release_job.outputs.upload_url }} 259asset_path : oculante_app_intel.zip 260asset_name : oculante_mac_intel.zip 261asset_content_type : application/zip 262 263- name : Upload Windows 2019 Release exe 264if : matrix.os == 'windows-2019' 265id : upload-release-asset-windows-classic 266uses : actions/upload-release-asset@v1 267env : 268GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 269with : 270upload_url : ${{ needs.release_job.outputs.upload_url }} 271asset_path : target/release/oculante.exe 272asset_name : oculante.exe 273asset_content_type : application/zip 274 275publish_release : 276name : Publish release 277needs : [ build_job , release_job ] 278runs-on : ubuntu-20.04 279steps : 280- name : Test id 281run : echo "${{ needs.release_job.outputs.release_id }}" 282- name : Test id 2 283run : echo "${{ needs.release_job.outputs.upload_url }}" 284- name : Publish 285uses : eregon/publish-release@v1 286env : 287GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 288with : 289release_id : ${{ needs.release_job.outputs.release_id }} 290 291# aur-publish: 292# runs-on: ubuntu-latest 293# steps: 294# - uses: actions/checkout@v4 295# - name: Publish AUR package 296# uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 297# with: 298# pkgname: oculante 299# pkgbuild: ./PKGBUILD 300# commit_username: ${{ secrets.AUR_USERNAME }} 301# commit_email: ${{ secrets.AUR_EMAIL }} 302# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} 303# commit_message: Update oculante AUR package 304# ssh_keyscan_types: rsa,dsa,ecdsa,ed25519