fork/oculante

git clone https://git.julia.blue/fork/oculante

Johann WoelperMerge pull request #666 from woelper/update_notan00922d7

master
9.7 KiB141 linesraw
1on:
2  push:
3    branches: [ "master" ]
4  pull_request:
5    # The branches below must be a subset of the branches above
6    branches: [ "master" ]
7
8env:
9  CARGO_TERM_COLOR: always
10  MACOS_DEPLOYMENT_TARGET: 10.15
11  CMAKE_ARGS: "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
12  SHADERC_LIB_DIR: /opt/homebrew/lib
13  
14name: Check OSX
15jobs:
16  check:
17    strategy:
18      matrix:
19        os: [macos-14]
20    runs-on: ${{ matrix.os }}
21    steps:
22      - uses: actions/checkout@v4
23      - uses: ilammy/setup-nasm@v1
24      - uses: Swatinem/rust-cache@v2
25
26      # - name: Check without default features
27      #   run: cargo check --no-default-features --features notan/shaderc
28      #   if: matrix.os == 'macos-14'
29
30      - name: intel heif test
31        run: |
32          rustc --version --verbose
33          brew install libheif
34          cargo install cargo-bundle
35          cargo bundle --release --features "notan/shaderc heif"
36          otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
37          mkdir target/release/bundle/osx/oculante.app/Contents/Frameworks/
38          cp /usr/local/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
39          cp /usr/local/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
40          cp /usr/local/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
41          cp /usr/local/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
42          cp /usr/local/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
43          cp /usr/local/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
44          install_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
45          install_name_tool -add_rpath "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
46          install_name_tool -add_rpath "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
47          install_name_tool -add_rpath "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
48          install_name_tool -add_rpath "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
49          install_name_tool -add_rpath "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
50          install_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
51          install_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
52          install_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
53          install_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
54          install_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
55          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib
56          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib
57          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib
58          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib
59          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib
60          codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
61          otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
62          cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist
63        if: matrix.os == 'macos-12'
64
65      - name: Zip Mac Intel Bundle
66        run: mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_intel.zip oculante.app
67        if: matrix.os == 'macos-12'
68
69      - name: Archive intel build
70        uses: actions/upload-artifact@v4
71        with:
72          name: intel_build
73          path: oculante_app_intel.zip
74        if: matrix.os == 'macos-12'
75
76      # - name: arm heif test
77      #   run: |
78      #     rustc --version --verbose
79      #     brew install libheif
80      #     cargo install cargo-bundle
81      #     cargo bundle --release --features "notan/shaderc heif"
82      #     otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
83      #     mkdir target/release/bundle/osx/oculante.app/Contents/Frameworks/
84      #     cp /opt/homebrew/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
85      #     cp /opt/homebrew/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
86      #     cp /opt/homebrew/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
87      #     cp /opt/homebrew/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
88      #     cp /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
89      #     cp /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
90      #     install_name_tool -change /opt/homebrew/opt/libheif/lib/libheif.1.dylib "@executable_path/../Frameworks/libheif.1.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
91      #     install_name_tool -add_rpath "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
92      #     install_name_tool -add_rpath "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
93      #     install_name_tool -add_rpath "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
94      #     install_name_tool -add_rpath "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
95      #     install_name_tool -add_rpath "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
96      #     install_name_tool -change /opt/homebrew/opt/x265/lib/libx265.209.dylib "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
97      #     install_name_tool -change /opt/homebrew/opt/libde265/lib/libde265.0.dylib "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
98      #     install_name_tool -change /opt/homebrew/opt/aom/lib/libaom.3.dylib "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
99      #     install_name_tool -change /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
100      #     install_name_tool -change /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib
101      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib
102      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib
103      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib
104      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib
105      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib
106      #     codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
107      #     otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
108      #     cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist
109      #   if: matrix.os == 'macos-14'
110
111      # - name: Zip Mac Arm Bundle
112      #   run: mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm.zip oculante.app
113      #   if: matrix.os == 'macos-14'
114
115      # - name: Archive arm build
116      #   uses: actions/upload-artifact@v4
117      #   with:
118      #     name: arm_build
119      #     path: oculante_app_arm.zip
120      #   if: matrix.os == 'macos-14'
121
122      - name: Cargo build on Apple Silicon
123        run: |
124          rustc --version --verbose
125          # cargo install cargo-bundle
126          brew install shaderc
127          cargo build
128        if: matrix.os == 'macos-14'
129
130      # - name: Zip Mac Arm Bundle
131      #   run: |
132      #     rm -rf oculante.app
133      #     mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm_noheif.zip oculante.app
134      #   if: matrix.os == 'macos-14'
135
136      # - name: Archive arm build
137      #   uses: actions/upload-artifact@v4
138      #   with:
139      #     name: arm_build2
140      #     path: oculante_app_arm_noheif.zip
141      #   if: matrix.os == 'macos-14'