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