2022-05-10 19:31:19 +03:00
|
|
|
name: Test CI
|
|
|
|
|
2022-05-11 06:22:09 +03:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
os:
|
|
|
|
description: "Runs on OS"
|
|
|
|
required: true
|
|
|
|
default: windows-latest
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- windows-latest
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
2022-08-29 06:02:14 +03:00
|
|
|
- ubuntu-18.04
|
|
|
|
- ubuntu-20.04
|
|
|
|
- ubuntu-22.04
|
|
|
|
- macos-10.15
|
|
|
|
- macos-11
|
|
|
|
- macos-12
|
|
|
|
- windows-2019
|
|
|
|
- windows-2022
|
2022-05-10 19:31:19 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: short
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2022-05-11 06:22:09 +03:00
|
|
|
runs-on: ${{ github.event.inputs.os }}
|
2022-05-10 19:31:19 +03:00
|
|
|
if: startsWith(github.repository, 'zzzgydi')
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
2022-09-28 12:12:27 +03:00
|
|
|
# - name: Rust Cache
|
|
|
|
# uses: Swatinem/rust-cache@v1
|
|
|
|
# with:
|
|
|
|
# working-directory: src-tauri
|
2022-05-11 06:30:19 +03:00
|
|
|
|
2022-05-10 19:31:19 +03:00
|
|
|
- name: Install Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
|
|
|
|
- name: Install Dependencies (ubuntu only)
|
2022-08-29 12:26:09 +03:00
|
|
|
if: startsWith(github.event.inputs.os, 'ubuntu-')
|
2022-05-10 19:31:19 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-05-11 07:20:20 +03:00
|
|
|
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libayatana-appindicator3-dev
|
2022-09-28 10:13:24 +03:00
|
|
|
|
|
|
|
- name: Install ARM64 toolchain (windows only)
|
2022-09-28 10:19:50 +03:00
|
|
|
if: startsWith(github.event.inputs.os, 'windows-')
|
2022-09-28 10:13:24 +03:00
|
|
|
run: |
|
|
|
|
rustup target add aarch64-pc-windows-msvc
|
2022-09-28 11:04:05 +03:00
|
|
|
rustup target list
|
2022-05-10 19:31:19 +03:00
|
|
|
|
2022-09-28 12:26:32 +03:00
|
|
|
rm ./src-tauri/Cargo.lock
|
|
|
|
|
2022-05-10 19:31:19 +03:00
|
|
|
- name: Get yarn cache dir path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
- name: Yarn Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
|
|
|
- name: Yarn install and check
|
|
|
|
run: |
|
|
|
|
yarn install --network-timeout 1000000
|
2022-05-31 19:43:57 +03:00
|
|
|
yarn run check
|
2022-05-10 19:31:19 +03:00
|
|
|
|
2022-09-28 12:12:27 +03:00
|
|
|
# - name: Tauri build
|
|
|
|
# uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
|
|
|
|
# env:
|
|
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
2022-09-28 10:13:24 +03:00
|
|
|
|
|
|
|
- name: Tauri build arm64 (windows only)
|
2022-09-28 10:19:50 +03:00
|
|
|
if: startsWith(github.event.inputs.os, 'windows-')
|
2022-09-28 10:13:24 +03:00
|
|
|
uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
with:
|
2022-09-28 11:04:05 +03:00
|
|
|
args: --target aarch64-pc-windows-msvc
|