mirror of
https://github.com/woelper/oculante
synced 2024-10-18 05:32:34 +00:00
Merge pull request #464 from woelper/improve_checks
Update branch on checks, add a test check
This commit is contained in:
commit
6b4d770902
7
.github/workflows/check_arm7.yml
vendored
7
.github/workflows/check_arm7.yml
vendored
|
@ -1,8 +1,9 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
name: Check ARM
|
||||
jobs:
|
||||
|
|
|
@ -2,9 +2,10 @@ name: Check NetBSD
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
@ -14,7 +15,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Build in NetBSD
|
||||
id: testnet
|
||||
uses: vmactions/netbsd-vm@v1
|
||||
uses: vmactions/netbsd-vm@v1.1.4
|
||||
with:
|
||||
mem: 4096
|
||||
usesh: true
|
||||
|
|
9
.github/workflows/check_netbsd_minimal.yml
vendored
9
.github/workflows/check_netbsd_minimal.yml
vendored
|
@ -2,9 +2,10 @@ name: Check NetBSD minimal
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
@ -14,7 +15,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Test in NetBSD
|
||||
id: test
|
||||
uses: vmactions/netbsd-vm@v1.0.5
|
||||
uses: vmactions/netbsd-vm@v1.1.4
|
||||
with:
|
||||
usesh: true
|
||||
copyback: false
|
||||
|
|
139
.github/workflows/check_osx.yml
vendored
139
.github/workflows/check_osx.yml
vendored
|
@ -1,8 +1,9 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
@ -13,19 +14,15 @@ jobs:
|
|||
check:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-14, macos-12]
|
||||
os: [macos-14]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/setup-nasm@v1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check without default features
|
||||
run: cargo check --no-default-features --features notan/shaderc
|
||||
if: matrix.os == 'macos-14'
|
||||
|
||||
# - name: Run arm build
|
||||
# run: cargo build
|
||||
# - name: Check without default features
|
||||
# run: cargo check --no-default-features --features notan/shaderc
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
||||
- name: intel heif test
|
||||
|
@ -73,69 +70,69 @@ jobs:
|
|||
name: intel_build
|
||||
path: oculante_app_intel.zip
|
||||
if: matrix.os == 'macos-12'
|
||||
|
||||
- name: arm heif test
|
||||
|
||||
# - name: arm heif test
|
||||
# run: |
|
||||
# rustc --version --verbose
|
||||
# brew install libheif
|
||||
# cargo install cargo-bundle
|
||||
# cargo bundle --release --features "notan/shaderc heif"
|
||||
# otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# mkdir target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# cp /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
# 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
|
||||
# install_name_tool -add_rpath "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# install_name_tool -add_rpath "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# install_name_tool -add_rpath "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# install_name_tool -add_rpath "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# install_name_tool -add_rpath "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib
|
||||
# codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
|
||||
# otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
# cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
||||
# - name: Zip Mac Arm Bundle
|
||||
# run: mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm.zip oculante.app
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
||||
# - name: Archive arm build
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: arm_build
|
||||
# path: oculante_app_arm.zip
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
||||
- name: Cargo build on Apple Silicon
|
||||
run: |
|
||||
rustc --version --verbose
|
||||
brew install libheif
|
||||
cargo install cargo-bundle
|
||||
cargo bundle --release --features "notan/shaderc heif"
|
||||
otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
mkdir target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/libheif/lib/libheif.1.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/x265/lib/libx265.209.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/libde265/lib/libde265.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/aom/lib/libaom.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/webp/lib/libsharpyuv.0.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
cp /opt/homebrew/opt/libvmaf/lib/libvmaf.3.dylib target/release/bundle/osx/oculante.app/Contents/Frameworks/
|
||||
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
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks/libx265.209.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks/libde265.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks/libaom.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks/libsharpyuv.0.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
install_name_tool -add_rpath "@executable_path/../Frameworks/libvmaf.3.dylib" target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libvmaf.3.dylib
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libsharpyuv.0.dylib
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libaom.3.dylib
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libde265.0.dylib
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libx265.209.dylib
|
||||
codesign -s "-" -fv target/release/bundle/osx/oculante.app/Contents/Frameworks/libheif.1.dylib
|
||||
otool -L target/release/bundle/osx/oculante.app/Contents/MacOS/oculante
|
||||
cp Info.plist target/release/bundle/osx/oculante.app/Contents/Info.plist
|
||||
if: matrix.os == 'macos-14'
|
||||
|
||||
- name: Zip Mac Arm Bundle
|
||||
run: mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm.zip oculante.app
|
||||
# cargo install cargo-bundle
|
||||
cargo build
|
||||
if: matrix.os == 'macos-14'
|
||||
|
||||
- name: Archive arm build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: arm_build
|
||||
path: oculante_app_arm.zip
|
||||
if: matrix.os == 'macos-14'
|
||||
|
||||
- name: arm test
|
||||
run: |
|
||||
rustc --version --verbose
|
||||
cargo install cargo-bundle
|
||||
cargo bundle --release --features "notan/shaderc"
|
||||
if: matrix.os == 'macos-14'
|
||||
|
||||
- name: Zip Mac Arm Bundle
|
||||
run: |
|
||||
rm -rf oculante.app
|
||||
mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm_noheif.zip oculante.app
|
||||
if: matrix.os == 'macos-14'
|
||||
# - name: Zip Mac Arm Bundle
|
||||
# run: |
|
||||
# rm -rf oculante.app
|
||||
# mv target/release/bundle/osx/oculante.app . && zip -r oculante_app_arm_noheif.zip oculante.app
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
||||
- name: Archive arm build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: arm_build2
|
||||
path: oculante_app_arm_noheif.zip
|
||||
if: matrix.os == 'macos-14'
|
||||
# - name: Archive arm build
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: arm_build2
|
||||
# path: oculante_app_arm_noheif.zip
|
||||
# if: matrix.os == 'macos-14'
|
||||
|
|
31
.github/workflows/check_run_tests.yml
vendored
Normal file
31
.github/workflows/check_run_tests.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
name: Run tests
|
||||
jobs:
|
||||
check:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ilammy/setup-nasm@v1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Patch azure linux deps
|
||||
run: sudo apt update
|
||||
|
||||
- name: Install linux deps
|
||||
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev libasound2-dev
|
||||
|
||||
- name: Update Rust
|
||||
run: rustup update
|
||||
|
||||
- name: cargo test
|
||||
run: cargo test ci_
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
name: Check Ubuntu
|
||||
jobs:
|
||||
|
|
7
.github/workflows/check_windows.yml
vendored
7
.github/workflows/check_windows.yml
vendored
|
@ -1,8 +1,9 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
|
||||
name: Check Windows
|
||||
jobs:
|
||||
|
|
|
@ -10,7 +10,7 @@ use super::*;
|
|||
use std::{fs::File, io::Write, path::PathBuf, time::Instant};
|
||||
|
||||
#[test]
|
||||
fn load() {
|
||||
fn ci_load() {
|
||||
open_image(
|
||||
&PathBuf::from("tests/frstvisuals-lmV1g1UbdhQ-unsplash.jpg"),
|
||||
None,
|
||||
|
@ -89,7 +89,7 @@ fn bench_load_large() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn bench_process_pxl() {
|
||||
fn ci_bench_process_pxl() {
|
||||
std::env::set_var("RUST_LOG", "info");
|
||||
let _ = env_logger::try_init();
|
||||
let iters = 5;
|
||||
|
@ -275,7 +275,7 @@ fn flathub() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn bench_process_all() {
|
||||
fn ci_bench_process_all() {
|
||||
std::env::set_var("RUST_LOG", "info");
|
||||
let _ = env_logger::try_init();
|
||||
let iters = 5;
|
||||
|
|
Loading…
Reference in a new issue