From 9f615f2c3bc07734f31fc2a704228be8c9c998e8 Mon Sep 17 00:00:00 2001 From: Shannon Tenner Date: Thu, 21 Nov 2024 12:41:35 +0200 Subject: [PATCH] ci: use tauri-action & create empty dist --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7529d169b..84fa7b5b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ concurrency: jobs: cargo-checks: - name: cargo checks fmt, clippy, check) + name: cargo checks (fmt, clippy, check) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -83,37 +83,45 @@ jobs: cargo install cargo-machete cargo machete - tauri-build: - name: tauri-build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: install dependencies (linux) - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends --assume-yes \ - libwebkit2gtk-4.1-dev \ - libappindicator3-dev \ - librsvg2-dev \ - patchelf \ - libprotobuf-dev \ - protobuf-compiler + tauri-test-build: + strategy: + fail-fast: true + name: tauri-build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: create empty dist dir + run: | + mkdir dist + - name: install dependencies (linux) + run: | + sudo apt-get update + sudo apt-get install --no-install-recommends --assume-yes \ + libwebkit2gtk-4.1-dev \ + libappindicator3-dev \ + librsvg2-dev \ + patchelf \ + libprotobuf-dev \ + protobuf-compiler - - name: install dependencies (linux/OpenCL) - run: | - sudo apt-get install --no-install-recommends --assume-yes \ - opencl-headers \ - ocl-icd-opencl-dev + - name: install dependencies (linux/OpenCL) + run: | + sudo apt-get install --no-install-recommends --assume-yes \ + opencl-headers \ + ocl-icd-opencl-dev - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'npm' - - name: Install dependencies (node) - run: npm ci - - uses: dtolnay/rust-toolchain@stable - - uses: swatinem/rust-cache@v2.7.5 - with: - workspaces: './src-tauri -> target' - - name: NPM tauri build - run: npm run tauri build -- --ci + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'npm' + - name: Install dependencies (node) + run: npm ci + - uses: dtolnay/rust-toolchain@stable + - uses: swatinem/rust-cache@v2.7.5 + with: + workspaces: './src-tauri -> target' + # If tagName and releaseId are omitted tauri-action will only build the app and won't try to upload any assets. + - name: test tauri build + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}