From 91657739294b5b6b610e13eed7def2c9862c7a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Thu, 11 May 2023 22:14:02 +0200 Subject: [PATCH] Change Github CI --- .github/workflows/linux_cli.yml | 16 +++---------- .github/workflows/linux_gui.yml | 40 ++++++++------------------------- .github/workflows/mac.yml | 16 +++---------- .github/workflows/quality.yml | 14 ------------ .github/workflows/windows.yml | 10 --------- 5 files changed, 15 insertions(+), 81 deletions(-) diff --git a/.github/workflows/linux_cli.yml b/.github/workflows/linux_cli.yml index 5010024..f13c4db 100644 --- a/.github/workflows/linux_cli.yml +++ b/.github/workflows/linux_cli.yml @@ -18,22 +18,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - - uses: actions/cache@v3 - with: - path: | - target - key: linux-default-${{github.ref}}-${{github.sha}} - restore-keys: | - linux-default-${{github.ref}}-${{github.sha}} - - name: Install basic libraries run: sudo apt-get update; sudo apt install libheif-dev -y + - name: Setup rust version + run: rustup default ${{ matrix.toolchain }} + - name: Build Release run: cargo build --release --bin czkawka_cli env: diff --git a/.github/workflows/linux_gui.yml b/.github/workflows/linux_gui.yml index bbb55e8..c5d6f72 100644 --- a/.github/workflows/linux_gui.yml +++ b/.github/workflows/linux_gui.yml @@ -18,22 +18,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - - uses: actions/cache@v3 - with: - path: | - target - key: linux-default-${{github.ref}}-${{github.sha}} - restore-keys: | - linux-default-${{github.ref}}-${{github.sha}} - - name: Install basic libraries run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev -y + - name: Setup rust version + run: rustup default ${{ matrix.toolchain }} + - name: Build Release Heif run: cargo build --release --features heif env: @@ -64,22 +54,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - - uses: actions/cache@v3 - with: - path: | - target - key: linux-appimage-gui-${{github.ref}}-${{github.sha}} - restore-keys: | - linux-appimage-gui-${{github.ref}}-${{github.sha}} - - name: Install Dependencies run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y + - name: Setup rust version + run: rustup default ${{ matrix.toolchain }} + - name: Build Release run: cargo build --release env: @@ -130,14 +110,12 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - name: Install Dependencies run: sudo apt-get update; sudo apt install libgtk-4-dev libheif-dev librsvg2-dev wget fuse libfuse2 -y xvfb + - name: Setup rust version + run: rustup default ${{ matrix.toolchain }} + - name: Test run: xvfb-run cargo test env: diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index f0729e9..9bf36e5 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -18,19 +18,6 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - - - uses: actions/cache@v3 - with: - path: | - target - key: mac-${{github.ref}}-${{github.sha}} - restore-keys: | - mac-${{github.ref}}-${{github.sha}} - - name: Install Homebrew run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" @@ -40,6 +27,9 @@ jobs: brew install rust gtk4 libheif || true brew link --overwrite python@3.11 + - name: Setup rust version + run: rustup default ${{ matrix.toolchain }} + - name: Build Release run: cargo build --release env: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index a3d34e6..a7c0459 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -14,20 +14,6 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - target - key: quality-${{github.ref}}-${{github.sha}} - restore-keys: | - quality-cli-${{github.ref}}-${{github.sha}} - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt, clippy - override: true - - name: Install Gtk 4 run: sudo apt-get update; sudo apt install -y libgtk-4-dev libheif-dev -y diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c9d8c7d..f0ae376 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,11 +18,6 @@ jobs: - name: Install additional dependencies # gio is for the build script run: dnf install wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: x86_64-pc-windows-gnu - name: Cache ~/.cargo uses: actions/cache@v1 with: @@ -82,11 +77,6 @@ jobs: - name: Install additional dependencies # gio is for the build script run: dnf install wget2 unzip mingw64-bzip2.noarch mingw64-poppler mingw64-poppler-glib mingw32-python3 rust-gio-devel adwaita-icon-theme -y && dnf clean all -y - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: x86_64-pc-windows-gnu - name: Cache ~/.cargo uses: actions/cache@v1 with: