-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,20 @@ on: | |
tags: | ||
- '*' | ||
branches: | ||
- '*' | ||
- '*' | ||
pull_request: | ||
types: | ||
- opened | ||
branches: | ||
- 'release**' | ||
- 'main' | ||
|
||
jobs: | ||
build: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest] | ||
os: [ windows-latest, macos-11, macos-14 ] | ||
name: build ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
@@ -34,10 +34,10 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set rust_version from rust_toolchain file | ||
run: echo "RUST_VERSION=$(cat src-tauri/rust-toolchain)" >> $GITHUB_ENV | ||
|
||
- name: Set rust_version from rust_toolchain file | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
|
@@ -47,9 +47,9 @@ jobs: | |
- uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: '${{ env.RUST_VERSION }}' | ||
toolchain: "${{ env.RUST_VERSION }}" | ||
override: true | ||
|
||
# Setup Node.js | ||
- name: setup node | ||
uses: actions/[email protected] | ||
|
@@ -60,7 +60,7 @@ jobs: | |
if: matrix.os == 'windows-latest' | ||
uses: KyleMayes/install-llvm-action@v1 | ||
with: | ||
version: '11.0' | ||
version: "11.0" | ||
directory: ${{ runner.temp }}/llvm | ||
|
||
- name: Set LIBCLANG_PATH | ||
|
@@ -74,16 +74,17 @@ jobs: | |
$var = (get-item $(rustup which rustc)).Directory.Parent.FullName+ '\lib\rustlib\' + (rustc -vV | findstr "host:*").split(':')[1].Trim() + '\lib' | ||
Copy-Item ('${{ github.workspace }}' + '\redist' + '\x86_64\*') -Destination $var -Recurse | ||
######## CACHE ######## | ||
######## CACHE ######## | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: ./src-tauri | ||
shared-key: '${{ matrix.os }}' | ||
cache-all-crates: true | ||
cache-on-failure: true | ||
workspaces: ./src-tauri | ||
shared-key: "${{ matrix.os }}" | ||
cache-on-failure: true | ||
|
||
|
||
######## BUILD ######## | ||
######## BUILD ######## | ||
|
||
- name: yarn installation | ||
run: yarn install | ||
|
@@ -95,6 +96,6 @@ jobs: | |
- name: build tauri | ||
run: yarn run build:github-pr | ||
env: | ||
# Mocked keys. | ||
TAURI_PRIVATE_KEY: 'dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5ZUYrUFF0RS9ZbU5EN0VFWk52TmpDRDQvTFFWOHhqSXNkZFVvUjZSRWNJc0FBQkFBQUFBQUFBQUFBQUlBQUFBQTZhNUxkYVFJWDNWTENKR2tSNzFVcDhsRzcvd0lKeWRGcytBZDNyZ3o3OWRXOWVmbmZCQktJYk8xOHVHWG5CZ25XN1pBOXM3SjMyWW1DRFNZWFJ5WGxsd3B6d3RvOEtTNHFFbFM5VE5obmNEZ1dHeEljVFRhZ2FXa0RzNHZOVkNESE5DdDArUmkvUUE9Cg==' | ||
TAURI_KEY_PASSWORD: 'mock' | ||
# Mocked keys. | ||
TAURI_PRIVATE_KEY: "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5ZUYrUFF0RS9ZbU5EN0VFWk52TmpDRDQvTFFWOHhqSXNkZFVvUjZSRWNJc0FBQkFBQUFBQUFBQUFBQUlBQUFBQTZhNUxkYVFJWDNWTENKR2tSNzFVcDhsRzcvd0lKeWRGcytBZDNyZ3o3OWRXOWVmbmZCQktJYk8xOHVHWG5CZ25XN1pBOXM3SjMyWW1DRFNZWFJ5WGxsd3B6d3RvOEtTNHFFbFM5VE5obmNEZ1dHeEljVFRhZ2FXa0RzNHZOVkNESE5DdDArUmkvUUE9Cg==" | ||
TAURI_KEY_PASSWORD: "mock" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
- opened | ||
branches: | ||
- 'release**' | ||
- 'canary**' | ||
- 'main' | ||
jobs: | ||
ts-lint: | ||
|
@@ -43,10 +44,10 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set rust_version from rust_toolchain file | ||
run: echo "RUST_VERSION=$(cat src-tauri/rust-toolchain)" >> $GITHUB_ENV | ||
|
||
- uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
|
@@ -62,10 +63,10 @@ jobs: | |
with: | ||
shared-key: 'libra' # to share across CI builds, so it is not job-id specific | ||
cache-on-failure: true | ||
|
||
- name: check format | ||
working-directory: ./src-tauri | ||
run: cargo fmt --all -- --check | ||
run: cargo fmt --all -- --check | ||
|
||
- name: lint | ||
working-directory: ./src-tauri | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters