mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
refactor(cli): rename tooling/cli.rs folder to tooling/cli (#3388)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
committed by
GitHub
parent
62c7a8ad30
commit
4334865266
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@@ -17,8 +17,8 @@
|
||||
|
||||
/tooling/bundler/ @tauri-apps/bundler
|
||||
|
||||
/tooling/cli.rs/ @tauri-apps/core
|
||||
/tooling/cli/ @tauri-apps/core
|
||||
|
||||
/tooling/cli.rs/node/ @tauri-apps/js-cli
|
||||
/tooling/cli/node/ @tauri-apps/js-cli
|
||||
|
||||
/core/** @tauri-apps/core
|
||||
|
||||
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@@ -49,26 +49,26 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
|
||||
|
||||
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
|
||||
|
||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.studio/en/docs/get-started/intro#setting-up-your-environment) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli.rs/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.studio/en/docs/get-started/intro#setting-up-your-environment) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
||||
|
||||
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the respository in order to run correctly.
|
||||
|
||||
### Packages Overview
|
||||
|
||||
- The JS API (`/tooling/api`) contains JS bindings to the builtin Rust functions in the Rust API.
|
||||
- The Rust CLI (`/tooling/cli.rs`) is the primary CLI for creating and developing Tauri apps.
|
||||
- cli.js (`/tooling/cli.rs/node`) is a Node.js CLI wrapper for `cli.rs`.
|
||||
- cli.rs (`/tooling/cli`) is the primary CLI for creating and developing Tauri apps.
|
||||
- cli.js (`/tooling/cli/node`) is a Node.js CLI wrapper for `cli.rs`.
|
||||
- Tauri Bundler (`/tooling/bundler`) is used by the Rust CLI to package executables into installers.
|
||||
- Tauri Core (`/core/tauri`) is the heart of Tauri. It contains the code that starts the app, configures communication between Rust and the Webview, and ties all the other packages together.
|
||||
- The Macros (`/core/tauri-macros`) are used by Tauri Core for various functions.
|
||||
|
||||
### Developing The Node.js CLI (cli.js)
|
||||
|
||||
`cli.js` is a wrapper to `cli.rs` so most changes should be written on the Rust CLI. The `[Tauri repo root]/tooling/cli.rs/node` folder contains only packaging scripts to properly publish the Rust CLI binaries to NPM.
|
||||
`cli.js` is a wrapper to `cli.rs` so most changes should be written on the Rust CLI. The `[Tauri repo root]/tooling/cli/node` folder contains only packaging scripts to properly publish the Rust CLI binaries to NPM.
|
||||
|
||||
### Developing Tauri Bundler and Rust CLI
|
||||
|
||||
The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and the code for the Rust CLI is located in `[Tauri repo root]/tooling/cli.rs`. If you are using your local copy of cli.js (see above), any changes you make to the bundler and CLI will be automatically built and applied when running the build or dev command. Otherwise, running `cargo install --path .` in the Rust CLI directory will allow you to run `cargo tauri build` and `cargo tauri dev` anywhere, using the updated copy of the bundler and cli. You will have to run this command each time you make a change in either package.
|
||||
The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and the code for the Rust CLI is located in `[Tauri repo root]/tooling/cli`. If you are using your local copy of cli.js (see above), any changes you make to the bundler and CLI will be automatically built and applied when running the build or dev command. Otherwise, running `cargo install --path .` in the Rust CLI directory will allow you to run `cargo tauri build` and `cargo tauri dev` anywhere, using the updated copy of the bundler and cli. You will have to run this command each time you make a change in either package.
|
||||
|
||||
### Developing Tauri Core and Related Components (Rust API, Macros, Codegen, and Utils)
|
||||
|
||||
|
||||
20
.github/workflows/artifacts-updater.yml
vendored
20
.github/workflows/artifacts-updater.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/artifacts-updater.yml'
|
||||
- 'core/tauri/**'
|
||||
- 'tooling/cli.rs/**'
|
||||
- 'tooling/cli/**'
|
||||
- 'tooling/bundler/**'
|
||||
- 'examples/updater/**'
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
@@ -78,27 +78,27 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
${{ matrix.platform }}-stable-cargo-core-
|
||||
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-
|
||||
|
||||
- name: build and install cli.rs
|
||||
run: cargo install --path tooling/cli.rs
|
||||
run: cargo install --path tooling/cli
|
||||
- name: Check whether code signing should be enabled
|
||||
id: enablecodesigning
|
||||
env:
|
||||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
||||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
|
||||
run: |
|
||||
echo "Enable code signing: ${{ env.ENABLE_CODE_SIGNING != '' }}"
|
||||
echo "::set-output name=enabled::${{ env.ENABLE_CODE_SIGNING != '' }}"
|
||||
echo "Enable code signing: ${{ env.ENABLE_CODE_SIGNING != '' }}"
|
||||
echo "::set-output name=enabled::${{ env.ENABLE_CODE_SIGNING != '' }}"
|
||||
# run only on tauri-apps/tauri repo (require secrets)
|
||||
- name: build sample artifacts + code signing (updater)
|
||||
if: steps.enablecodesigning.outputs.enabled == 'true'
|
||||
|
||||
10
.github/workflows/audit.yml
vendored
10
.github/workflows/audit.yml
vendored
@@ -10,10 +10,10 @@ on:
|
||||
- cron: '0 0 * * *'
|
||||
push:
|
||||
paths:
|
||||
- "**/Cargo.lock"
|
||||
- "**/Cargo.toml"
|
||||
- "**/package.json"
|
||||
- "**/yarn.lock"
|
||||
- '**/Cargo.lock'
|
||||
- '**/Cargo.toml'
|
||||
- '**/package.json'
|
||||
- '**/yarn.lock'
|
||||
|
||||
jobs:
|
||||
audit-rust:
|
||||
@@ -30,5 +30,5 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: yarn audit
|
||||
working-directory: tooling/cli.rs/node
|
||||
working-directory: tooling/cli/node
|
||||
run: yarn audit
|
||||
|
||||
2
.github/workflows/build-smoke-tests.yml
vendored
2
.github/workflows/build-smoke-tests.yml
vendored
@@ -72,7 +72,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: build and install cli.rs
|
||||
run: cargo install --path tauri/tooling/cli.rs
|
||||
run: cargo install --path tauri/tooling/cli
|
||||
- name: install and build assets
|
||||
working-directory: "example/${{ github.event.inputs.dir }}"
|
||||
run: ${{ github.event.inputs.buildAssets }}
|
||||
|
||||
30
.github/workflows/core-lint-fmt.yml
vendored
30
.github/workflows/core-lint-fmt.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
- '.github/workflows/core-lint-fmt.yml'
|
||||
- 'core/**'
|
||||
- 'examples/**'
|
||||
- 'tooling/cli.rs/**'
|
||||
- 'tooling/cli/**'
|
||||
|
||||
jobs:
|
||||
workspace_clippy_fmt_check:
|
||||
@@ -89,20 +89,20 @@ jobs:
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --manifest-path ./tooling/cli.rs/Cargo.toml --all-targets --all-features -- -D warnings
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings
|
||||
name: cli
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
@@ -128,18 +128,18 @@ jobs:
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
key: ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-cli-
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --manifest-path ./tooling/cli.rs/Cargo.toml --all -- --check
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml --all -- --check
|
||||
|
||||
core_clippy_check:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -156,10 +156,10 @@ jobs:
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
@@ -32,19 +32,19 @@ jobs:
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
key: ubuntu-latest-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
ubuntu-latest-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
ubuntu-latest-stable-cargo-cli-
|
||||
|
||||
- name: build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./tooling/cli.rs/Cargo.toml
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml
|
||||
|
||||
- name: cargo login
|
||||
run: cargo login ${{ secrets.crate_token }}
|
||||
|
||||
8
.github/workflows/js-lint.yml
vendored
8
.github/workflows/js-lint.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/js-lint.yml'
|
||||
- 'tooling/cli.rs/node/**'
|
||||
- 'tooling/cli/node/**'
|
||||
- 'tooling/api/**'
|
||||
- 'tooling/create-tauri-app/**'
|
||||
|
||||
@@ -23,14 +23,14 @@ jobs:
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/*/yarn.lock
|
||||
- name: install cli.js deps via yarn
|
||||
working-directory: ./tooling/cli.rs/node/
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn
|
||||
# nothing to lint
|
||||
#- name: run cli.js lint
|
||||
# working-directory: ./tooling/cli.rs/node/
|
||||
# working-directory: ./tooling/cli/node/
|
||||
# run: yarn lint
|
||||
- name: run cli.js format
|
||||
working-directory: ./tooling/cli.rs/node/
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn format:check
|
||||
|
||||
- name: install api deps via yarn
|
||||
|
||||
40
.github/workflows/publish-cli.yml
vendored
40
.github/workflows/publish-cli.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: tooling/cli.rs/node/
|
||||
working-directory: tooling/cli/node/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -35,14 +35,14 @@ jobs:
|
||||
docker pull $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||
docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-debian builder
|
||||
build: |
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli.rs/node && yarn build && strip *.node"
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli/node && yarn build && strip *.node"
|
||||
- host: ubuntu-18.04
|
||||
target: x86_64-unknown-linux-musl
|
||||
architecture: x64
|
||||
docker: |
|
||||
docker pull $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
docker tag $DOCKER_REGISTRY_URL/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
|
||||
build: docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli.rs/node && yarn build && strip *.node"
|
||||
build: docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli/node && yarn build && strip *.node"
|
||||
- host: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
build: |
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
|
||||
build: |
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli.rs/node && yarn build --target=aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node"
|
||||
docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd)/../../../:/build -w /build builder sh -c "cd tooling/cli/node && yarn build --target=aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node"
|
||||
#- host: windows-latest
|
||||
# architecture: x64
|
||||
# target: aarch64-pc-windows-msvc
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli.rs/node/yarn.lock'
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
architecture: ${{ matrix.settings.architecture }}
|
||||
- name: Install
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
with:
|
||||
key: ${{ matrix.settings.target }}
|
||||
working-directory: 'tooling/cli.rs/'
|
||||
working-directory: 'tooling/cli/'
|
||||
- name: Pull latest image
|
||||
run: ${{ matrix.settings.docker }}
|
||||
env:
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bindings-${{ matrix.settings.target }}
|
||||
path: tooling/cli.rs/node/${{ env.APP_NAME }}.*.node
|
||||
path: tooling/cli/node/${{ env.APP_NAME }}.*.node
|
||||
if-no-files-found: error
|
||||
# build-freebsd:
|
||||
# runs-on: macos-10.15
|
||||
@@ -164,7 +164,7 @@ jobs:
|
||||
# whoami
|
||||
# env
|
||||
# freebsd-version
|
||||
# cd ./tooling/cli.rs/node/
|
||||
# cd ./tooling/cli/node/
|
||||
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
# yarn build
|
||||
# strip -x *.node
|
||||
@@ -174,7 +174,7 @@ jobs:
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: bindings-freebsd
|
||||
# path: tooling/cli.rs/node/${{ env.APP_NAME }}.*.node
|
||||
# path: tooling/cli/node/${{ env.APP_NAME }}.*.node
|
||||
# if-no-files-found: error
|
||||
test-macOS-windows-binding:
|
||||
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
|
||||
@@ -201,14 +201,14 @@ jobs:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli.rs/node/yarn.lock'
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bindings-${{ matrix.settings.target }}
|
||||
path: 'tooling/cli.rs/node/'
|
||||
path: 'tooling/cli/node/'
|
||||
- name: List packages
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
@@ -234,14 +234,14 @@ jobs:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli.rs/node/yarn.lock'
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bindings-x86_64-unknown-linux-gnu
|
||||
path: 'tooling/cli.rs/node/'
|
||||
path: 'tooling/cli/node/'
|
||||
- name: List packages
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
@@ -273,14 +273,14 @@ jobs:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli.rs/node/yarn.lock'
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bindings-x86_64-unknown-linux-musl
|
||||
path: 'tooling/cli.rs/node/'
|
||||
path: 'tooling/cli/node/'
|
||||
- name: List packages
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
@@ -326,12 +326,12 @@ jobs:
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bindings-aarch64-unknown-linux-gnu
|
||||
path: 'tooling/cli.rs/node/'
|
||||
path: 'tooling/cli/node/'
|
||||
- name: Download armv7-gnueabihf artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: bindings-armv7-unknown-linux-gnueabihf
|
||||
path: 'tooling/cli.rs/node/'
|
||||
path: 'tooling/cli/node/'
|
||||
# TODO: actually run test, blocked by https://github.com/rust-lang/cargo/issues/8719
|
||||
- uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
@@ -349,7 +349,7 @@ jobs:
|
||||
eval "$(fnm env --use-on-cd)"
|
||||
fnm install ${{ matrix.node }}
|
||||
fnm use ${{ matrix.node }}
|
||||
cd tooling/cli.rs/node
|
||||
cd tooling/cli/node
|
||||
yarn tauri --help
|
||||
ls -la
|
||||
publish:
|
||||
@@ -369,13 +369,13 @@ jobs:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli.rs/node/yarn.lock'
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: tooling/cli.rs/node/artifacts
|
||||
path: tooling/cli/node/artifacts
|
||||
- name: Move artifacts
|
||||
run: yarn artifacts
|
||||
- name: List packages
|
||||
|
||||
28
.github/workflows/test-core.yml
vendored
28
.github/workflows/test-core.yml
vendored
@@ -110,7 +110,7 @@ jobs:
|
||||
- name: Get current date
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
@@ -136,19 +136,19 @@ jobs:
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-
|
||||
|
||||
- name: build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./tooling/cli.rs/Cargo.toml
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml
|
||||
|
||||
test-tauri-js-cli:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
@@ -170,7 +170,7 @@ jobs:
|
||||
with:
|
||||
node-version: 14
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/cli.rs/node/yarn.lock
|
||||
cache-dependency-path: tooling/cli/node/yarn.lock
|
||||
- name: install webkit2gtk (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
- name: Get current date
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
@@ -210,29 +210,29 @@ jobs:
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-cargo-cli-
|
||||
|
||||
- name: Cache template cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/node/test/jest/fixtures/empty/src-tauri/target
|
||||
path: tooling/cli/node/test/jest/fixtures/empty/src-tauri/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli.rs/templates/app/**') }}-${{ env.CURRENT_DATE }}
|
||||
key: ${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli/templates/app/**') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli.rs/templates/app/**') }}
|
||||
${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli/templates/app/**') }}
|
||||
${{ matrix.platform }}-stable-template-
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
cd ./tooling/cli.rs/node
|
||||
cd ./tooling/cli/node
|
||||
yarn
|
||||
yarn build
|
||||
yarn test
|
||||
|
||||
4
.github/workflows/test-cta.yml
vendored
4
.github/workflows/test-cta.yml
vendored
@@ -47,9 +47,9 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
#- run: yarn
|
||||
# working-directory: tooling/cli.rs/node
|
||||
# working-directory: tooling/cli/node
|
||||
#- run: yarn build
|
||||
# working-directory: tooling/cli.rs/node
|
||||
# working-directory: tooling/cli/node
|
||||
- run: yarn
|
||||
working-directory: tooling/api
|
||||
- run: yarn build
|
||||
|
||||
158
.github/workflows/udeps.yml
vendored
158
.github/workflows/udeps.yml
vendored
@@ -10,99 +10,99 @@ on:
|
||||
- '.github/workflows/udeps.yml'
|
||||
- 'core/**'
|
||||
- 'tooling/bundler/**'
|
||||
- 'tooling/cli.rs/**'
|
||||
- 'tooling/cli/**'
|
||||
|
||||
jobs:
|
||||
udeps:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-registry-
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-registry-
|
||||
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-index-
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v2.1.4
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-index-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-core-
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-core-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-cargo-core-
|
||||
|
||||
- name: Cache bundler cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/bundler/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-bundler-
|
||||
- name: Cache bundler cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/bundler/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-bundler-${{ hashFiles('tooling/bundler/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-bundler-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli.rs/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli.rs/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-cli-
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-cargo-cli-
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cargo-udeps --locked
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cargo-udeps --locked
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: Install required packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --all-targets --all-features
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --all-targets --all-features
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets --all-features
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets --all-features
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --manifest-path ./tooling/cli.rs/Cargo.toml --all-targets --all-features
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features
|
||||
|
||||
Reference in New Issue
Block a user