mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-13 10:48:39 +02:00
Compare commits
444 Commits
1.3
...
fix/remap-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
586d702a40 | ||
|
|
020efa4dfa | ||
|
|
cc63794c91 | ||
|
|
2f70d8da2b | ||
|
|
c46c09f31d | ||
|
|
c2867a65d8 | ||
|
|
058469114d | ||
|
|
00c60097c5 | ||
|
|
1d0de2a558 | ||
|
|
1fa729b218 | ||
|
|
808deecfff | ||
|
|
b7a2ce2c63 | ||
|
|
3536aa00d1 | ||
|
|
1c8229fbe2 | ||
|
|
e513b69d98 | ||
|
|
cfcc7f3c20 | ||
|
|
5fdf8dcb8e | ||
|
|
36e4837cea | ||
|
|
17bf7f1f0f | ||
|
|
46e6187c89 | ||
|
|
3d16461b68 | ||
|
|
8661e4a0d7 | ||
|
|
f6c3ea6faa | ||
|
|
bfa69691a5 | ||
|
|
e8014a7f61 | ||
|
|
138cb8d739 | ||
|
|
852e11e17b | ||
|
|
c9364c2a4c | ||
|
|
a8d640b3c6 | ||
|
|
b72adc0a66 | ||
|
|
7e8e0e76ec | ||
|
|
50576a5e1e | ||
|
|
314f0e212f | ||
|
|
f7ac2e9250 | ||
|
|
db7765edad | ||
|
|
d20a728892 | ||
|
|
9da996073f | ||
|
|
ed6b81b29d | ||
|
|
b0d3128597 | ||
|
|
2d9936931a | ||
|
|
0d6bc3b583 | ||
|
|
aff1fd2c7d | ||
|
|
7a17c1e89f | ||
|
|
e71e375c29 | ||
|
|
36540ce3c3 | ||
|
|
275800a603 | ||
|
|
f29c56da8c | ||
|
|
328583e12e | ||
|
|
26f306d65c | ||
|
|
87ea607ef4 | ||
|
|
763f0bdcb0 | ||
|
|
27fa1022ee | ||
|
|
e601b9a790 | ||
|
|
60e6f6c3f1 | ||
|
|
35b587c830 | ||
|
|
b9559b35d1 | ||
|
|
d4f89af18d | ||
|
|
8fb1df8aa6 | ||
|
|
e0631d379c | ||
|
|
581b515e08 | ||
|
|
20ff1f4596 | ||
|
|
fc193a502f | ||
|
|
d4d6a98d98 | ||
|
|
a822a6ad74 | ||
|
|
6ed2b04872 | ||
|
|
7ccfa2fb0b | ||
|
|
1b9f0ec350 | ||
|
|
2455328f81 | ||
|
|
f4fe3beb84 | ||
|
|
54a4a14b41 | ||
|
|
b3591d46e6 | ||
|
|
0b4882ed92 | ||
|
|
ca3a53005a | ||
|
|
6ccfce4180 | ||
|
|
7aca4527e8 | ||
|
|
9d543f6ed3 | ||
|
|
2761dd037f | ||
|
|
9afbeb6b7a | ||
|
|
6e60bd637c | ||
|
|
8e4820642e | ||
|
|
a788aea85d | ||
|
|
7aab3e2076 | ||
|
|
05662b3129 | ||
|
|
62f8659bef | ||
|
|
8ac2f412be | ||
|
|
01b876761a | ||
|
|
8eabb09e80 | ||
|
|
49dff27ef1 | ||
|
|
b08ae637a0 | ||
|
|
8c842a54a6 | ||
|
|
72aa17f79a | ||
|
|
7ae67dde69 | ||
|
|
2809171fb4 | ||
|
|
4b9a5af3cf | ||
|
|
d2df2e831b | ||
|
|
c94e1326a7 | ||
|
|
4892637f83 | ||
|
|
ce76d95ab1 | ||
|
|
2265e09718 | ||
|
|
6d5dc9489c | ||
|
|
d703c7f459 | ||
|
|
281714e567 | ||
|
|
c1d84e8127 | ||
|
|
04ddee91e8 | ||
|
|
864dfe4de5 | ||
|
|
077605f58b | ||
|
|
00e1efaa9b | ||
|
|
7a8d570db7 | ||
|
|
0d5835d133 | ||
|
|
488a7562bb | ||
|
|
3f35b45263 | ||
|
|
146a794cb6 | ||
|
|
ff99a9bf74 | ||
|
|
bf550f94cc | ||
|
|
f439122622 | ||
|
|
9d2144128f | ||
|
|
f5305de251 | ||
|
|
d17027e1a0 | ||
|
|
72621892fe | ||
|
|
89602cdce3 | ||
|
|
c2608423b6 | ||
|
|
1956a3aeda | ||
|
|
14d567f7ec | ||
|
|
72389b00d7 | ||
|
|
4f2fd4dcf7 | ||
|
|
cf0986491c | ||
|
|
d7ffa7f95e | ||
|
|
015020760a | ||
|
|
a02c6c4c81 | ||
|
|
cd8c074ae6 | ||
|
|
f7a080a121 | ||
|
|
bca09f7f5f | ||
|
|
2bf9c27375 | ||
|
|
3dc38b150e | ||
|
|
28133c5155 | ||
|
|
1efe861d3c | ||
|
|
0eddb812c6 | ||
|
|
19ec53fae4 | ||
|
|
73fd60eef2 | ||
|
|
5fd4d20e3b | ||
|
|
4ab5545b7a | ||
|
|
233e43b0c3 | ||
|
|
d0d873e39a | ||
|
|
9db9e6c037 | ||
|
|
62144ef3be | ||
|
|
eaf0d71779 | ||
|
|
75a0c79dea | ||
|
|
c14b1df372 | ||
|
|
41a471b23a | ||
|
|
9e7ce0a8ee | ||
|
|
b293da35dd | ||
|
|
fdcd77338c | ||
|
|
9093ef3314 | ||
|
|
ffe21e0225 | ||
|
|
4f087cfd92 | ||
|
|
7225501c13 | ||
|
|
9c632ee35d | ||
|
|
b5059d77e9 | ||
|
|
f81c3f2922 | ||
|
|
8866ecac3c | ||
|
|
0f26960891 | ||
|
|
c7bffb01be | ||
|
|
9d872ab872 | ||
|
|
b6027b2dd2 | ||
|
|
2a0b2cea03 | ||
|
|
873840a204 | ||
|
|
445a8b6062 | ||
|
|
677db85877 | ||
|
|
c0989848b9 | ||
|
|
04681a6b13 | ||
|
|
2d545eff58 | ||
|
|
0e8d3a6f16 | ||
|
|
b490308c88 | ||
|
|
527bd9feea | ||
|
|
d710946064 | ||
|
|
15ebeb1851 | ||
|
|
50fbd49273 | ||
|
|
677838ccfa | ||
|
|
168c3d0148 | ||
|
|
2eec3e13fb | ||
|
|
a883c31088 | ||
|
|
f2d7405df4 | ||
|
|
1ecaeb29aa | ||
|
|
7e3d672b9b | ||
|
|
bb2510876d | ||
|
|
ed43ff3243 | ||
|
|
5fe68b1cec | ||
|
|
3d37ed38c7 | ||
|
|
830ae97955 | ||
|
|
67f14b4ce8 | ||
|
|
6e879742f0 | ||
|
|
a836373328 | ||
|
|
2e1bd04775 | ||
|
|
45a5cd569b | ||
|
|
3afccfce17 | ||
|
|
1aba1780de | ||
|
|
878421beb7 | ||
|
|
777c086590 | ||
|
|
60e08605d5 | ||
|
|
d8b996c00a | ||
|
|
7aaf27ce5f | ||
|
|
014aeca11f | ||
|
|
e7078a3030 | ||
|
|
b41447b811 | ||
|
|
aa119f2836 | ||
|
|
99fe1c562f | ||
|
|
9b1a6a1c02 | ||
|
|
c6321a610c | ||
|
|
e055c69c23 | ||
|
|
582c25a0f0 | ||
|
|
dc9269bc8d | ||
|
|
6c13840cee | ||
|
|
2d9c2b4724 | ||
|
|
23859f7502 | ||
|
|
ab29908aba | ||
|
|
873b9aee90 | ||
|
|
35264b4c18 | ||
|
|
a178f95d68 | ||
|
|
cc186c7a0e | ||
|
|
79dd6e16a7 | ||
|
|
9417ce401c | ||
|
|
7a231cd1c9 | ||
|
|
6ca8a056e8 | ||
|
|
e599d92681 | ||
|
|
a3a70218f3 | ||
|
|
cb6ee77e69 | ||
|
|
5b1e99f264 | ||
|
|
e00b1e5f94 | ||
|
|
161d5be49a | ||
|
|
e7ccbd8573 | ||
|
|
9076d5d2e7 | ||
|
|
ef41c5bfd4 | ||
|
|
0b43033c5c | ||
|
|
a65b5fea3d | ||
|
|
87ebf4e084 | ||
|
|
e37b7677cd | ||
|
|
fc2bac959b | ||
|
|
9d8b377481 | ||
|
|
4137ab44a8 | ||
|
|
bddf59e5d0 | ||
|
|
b713aed21b | ||
|
|
d23d6f60e8 | ||
|
|
357480f4ae | ||
|
|
95f467add5 | ||
|
|
b8bf8e0fac | ||
|
|
60bf067913 | ||
|
|
49f06ca4b9 | ||
|
|
4036e15f5a | ||
|
|
8357ce5b2e | ||
|
|
ecf6a8ad10 | ||
|
|
208ce34f1e | ||
|
|
4cbdf0fb1c | ||
|
|
f756cd5e7e | ||
|
|
a5861d8294 | ||
|
|
1129f4f575 | ||
|
|
d4cac20292 | ||
|
|
095b18620b | ||
|
|
a4aec9f0a8 | ||
|
|
39bf895b73 | ||
|
|
7c0fa1f3f9 | ||
|
|
a6c94119d8 | ||
|
|
321f3fed19 | ||
|
|
39443b4350 | ||
|
|
6f41a27124 | ||
|
|
1377f8e13b | ||
|
|
8f1ace7795 | ||
|
|
63011ca84e | ||
|
|
73d9cd51b2 | ||
|
|
a06dc69931 | ||
|
|
ca3cd8b3d1 | ||
|
|
0d3a97ec7b | ||
|
|
04201d43b1 | ||
|
|
d9d430e5a5 | ||
|
|
5d89905e39 | ||
|
|
eedfa5e618 | ||
|
|
7d9aa3987e | ||
|
|
1dd722c4a7 | ||
|
|
f98e1b128c | ||
|
|
82e915c487 | ||
|
|
628285c1cf | ||
|
|
54c337e06f | ||
|
|
e8e2853830 | ||
|
|
b9316a64ea | ||
|
|
ae65951bc4 | ||
|
|
08a44490d7 | ||
|
|
3baa6ac9b8 | ||
|
|
aec5537de0 | ||
|
|
4c5a30370c | ||
|
|
013fb354d9 | ||
|
|
adba73a9ff | ||
|
|
1d7171a1ec | ||
|
|
ecb489a77c | ||
|
|
0563fe3d46 | ||
|
|
18b17a954c | ||
|
|
60c15750c1 | ||
|
|
ee9706d8ae | ||
|
|
7950fcb9a8 | ||
|
|
e4292ce7be | ||
|
|
db26aaf2b4 | ||
|
|
c8445a69ca | ||
|
|
c764408da7 | ||
|
|
2954f6d252 | ||
|
|
0967da262e | ||
|
|
e939e6d9e4 | ||
|
|
3ceed62686 | ||
|
|
83a6dab7b2 | ||
|
|
9190206387 | ||
|
|
fbdd0a7ca9 | ||
|
|
3c62dbc902 | ||
|
|
255ebcb7ef | ||
|
|
447370fa50 | ||
|
|
9b793eeb68 | ||
|
|
5e74aefd4a | ||
|
|
6b737315b0 | ||
|
|
1c98751da4 | ||
|
|
b779e52ba7 | ||
|
|
3fdd287704 | ||
|
|
f4121c128e | ||
|
|
5b0b8ef83f | ||
|
|
e9412fb983 | ||
|
|
83eefccefd | ||
|
|
cdb5c8e068 | ||
|
|
824aec9e40 | ||
|
|
1d55a5fe1f | ||
|
|
bf5a9ab9e6 | ||
|
|
12e9d811e6 | ||
|
|
0837454b00 | ||
|
|
e6d9b670b0 | ||
|
|
8183153a86 | ||
|
|
5790218fb6 | ||
|
|
a9381f3b40 | ||
|
|
8fd79b8fc0 | ||
|
|
14f337d8ad | ||
|
|
4cd8507ea0 | ||
|
|
89af335156 | ||
|
|
bca796be2f | ||
|
|
0668dd4220 | ||
|
|
b9fb53ed73 | ||
|
|
ef8ca7b363 | ||
|
|
d88de30076 | ||
|
|
1629c5ad27 | ||
|
|
8a380fc4e3 | ||
|
|
2901145c49 | ||
|
|
38449bc57d | ||
|
|
8f6ab87fb4 | ||
|
|
cf6f0c511b | ||
|
|
bd51cddd6f | ||
|
|
4fa968dc0e | ||
|
|
e9f1e627f8 | ||
|
|
ab5a307bc1 | ||
|
|
238fdc9563 | ||
|
|
d35cc77831 | ||
|
|
169682219a | ||
|
|
4ac8006efd | ||
|
|
02a2ec52f1 | ||
|
|
28a1ec34a4 | ||
|
|
436f3d8d66 | ||
|
|
fa44c44379 | ||
|
|
fea70effad | ||
|
|
e16b366174 | ||
|
|
9ac6135c2a | ||
|
|
8bf0f66c06 | ||
|
|
9bbc30590b | ||
|
|
c53d9ea1b3 | ||
|
|
e4d5022077 | ||
|
|
725236cea0 | ||
|
|
d2572050be | ||
|
|
20a7036ba5 | ||
|
|
6ba99689aa | ||
|
|
8958e9fdb5 | ||
|
|
6119f4582e | ||
|
|
ff8fd7619a | ||
|
|
0e925fd8f0 | ||
|
|
64546cb9cc | ||
|
|
96885b6e5a | ||
|
|
9e48da502f | ||
|
|
3951aac930 | ||
|
|
e86c9df9f0 | ||
|
|
4d063ae9ee | ||
|
|
fd992c547e | ||
|
|
e602432ef6 | ||
|
|
698a31aa79 | ||
|
|
57ab9847eb | ||
|
|
4c24d10ff3 | ||
|
|
5813f08386 | ||
|
|
08584fc657 | ||
|
|
4e8b122df6 | ||
|
|
ed581950ea | ||
|
|
f957cbb56c | ||
|
|
5109c27501 | ||
|
|
d88b9de7aa | ||
|
|
1caf485fce | ||
|
|
3b44b01412 | ||
|
|
49f9334e19 | ||
|
|
3be8c238cc | ||
|
|
e59407f2bd | ||
|
|
58fc1f2150 | ||
|
|
f7d2dfc7a6 | ||
|
|
964926ff85 | ||
|
|
52f0c8bb83 | ||
|
|
fa23310f23 | ||
|
|
dcd506676c | ||
|
|
d6f7d3cfe8 | ||
|
|
90d5929fea | ||
|
|
f21cbecdeb | ||
|
|
331f346002 | ||
|
|
e6012b88af | ||
|
|
9f1d34c288 | ||
|
|
5c5c42edb6 | ||
|
|
75d3d677ae | ||
|
|
ae83d008f9 | ||
|
|
c04d0340e2 | ||
|
|
5cc1fd0f7b | ||
|
|
d576e8ae72 | ||
|
|
ba5560b2a1 | ||
|
|
0ad9531d79 | ||
|
|
0983d7ce7f | ||
|
|
024620529e | ||
|
|
596fa08d48 | ||
|
|
77e48ab7db | ||
|
|
d8cf9f9fcd | ||
|
|
433dafa01a | ||
|
|
810b3be080 | ||
|
|
77f4a7173b | ||
|
|
08deda5f99 | ||
|
|
aa9f1243e6 | ||
|
|
f7ea867d31 | ||
|
|
816f474c3e | ||
|
|
47fab6809a | ||
|
|
e903dfe762 | ||
|
|
b47d8c88c5 | ||
|
|
9b7caab672 | ||
|
|
2adef93faf | ||
|
|
c7fec3e1ff | ||
|
|
fd4c851ee9 | ||
|
|
d2b6351157 | ||
|
|
c2c1e6f081 | ||
|
|
38604a111e | ||
|
|
5785aeb806 | ||
|
|
6218c31e17 | ||
|
|
6d4945c9f0 | ||
|
|
b2a8930b3c | ||
|
|
b48962ed15 | ||
|
|
accbc5e880 |
2
.cargo/config
Normal file
2
.cargo/config
Normal file
@@ -0,0 +1,2 @@
|
||||
[env]
|
||||
__TAURI_WORKSPACE__ = "true"
|
||||
5
.changes/add-dylib-support-to-macos-frameworks.md
Normal file
5
.changes/add-dylib-support-to-macos-frameworks.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": patch
|
||||
---
|
||||
|
||||
Add dylib support to `tauri.bundle.macOS.frameworks`.
|
||||
5
.changes/additional-args-api.md
Normal file
5
.changes/additional-args-api.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"api": minor
|
||||
---
|
||||
|
||||
Added the `additionalBrowserArgs` option when creating a window.
|
||||
5
.changes/additional-args-config.md
Normal file
5
.changes/additional-args-config.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": minor
|
||||
---
|
||||
|
||||
Added the `additional_browser_args` option to the window configuration.
|
||||
7
.changes/additional-args.md
Normal file
7
.changes/additional-args.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri": minor
|
||||
"tauri-runtime-wry": minor
|
||||
"tauri-runtime": minor
|
||||
---
|
||||
|
||||
Added the `additional_browser_args` option when creating a window.
|
||||
5
.changes/bundler-msi-mini-version.md
Normal file
5
.changes/bundler-msi-mini-version.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'minor'
|
||||
---
|
||||
|
||||
Added support for pre-release identifiers and build numbers for the `.msi` bundle target. Only one of each can be used and it must be numeric only. The version must still be semver compatible according to https://semver.org/.
|
||||
5
.changes/cli-detect-profile.md
Normal file
5
.changes/cli-detect-profile.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'patch'
|
||||
---
|
||||
|
||||
Fix passing `--profile` to cargo in `tauri build` causing conflict with `--release` passed by the CLI.
|
||||
5
.changes/cli-dev-server-port.md
Normal file
5
.changes/cli-dev-server-port.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'cli.rs': 'patch'
|
||||
---
|
||||
|
||||
Add `--port` to specify the port used for static files dev server. It can also be specified through `TAURI_DEV_SERVER_PORT` env var.
|
||||
6
.changes/cli-info.md
Normal file
6
.changes/cli-info.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
---
|
||||
|
||||
Fix `tauri info` panicking when parsing crates version on a newly created project without a `Cargo.lock` file.
|
||||
|
||||
5
.changes/cli-rustc-not-found-msg.md
Normal file
5
.changes/cli-rustc-not-found-msg.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
---
|
||||
|
||||
Improve the error message when `rustc` couldn't be found.
|
||||
6
.changes/cli-sign-non-interactive.md
Normal file
6
.changes/cli-sign-non-interactive.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value.
|
||||
6
.changes/cli-watcher-crash.md
Normal file
6
.changes/cli-watcher-crash.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Do not crash on Cargo.toml watcher.
|
||||
7
.changes/cli-windows-paths-print.md
Normal file
7
.changes/cli-windows-paths-print.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
"tauri-bundler": "patch"
|
||||
---
|
||||
|
||||
On Windows, printing consistent paths on Windows with backslashs only.
|
||||
|
||||
5
.changes/cli.remap-path-prefix.md
Normal file
5
.changes/cli.remap-path-prefix.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
---
|
||||
|
||||
Configure the rust compiler to truncate absolute paths in panic messages and debug symbols when building in release mode. This prevents a possible leak of PII through absolute paths.
|
||||
5
.changes/clijs-node-version.md
Normal file
5
.changes/clijs-node-version.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'cli.js': patch
|
||||
---
|
||||
|
||||
Fix crash when nodejs binary has the version in its name, for example `node-18`
|
||||
@@ -5,10 +5,10 @@
|
||||
"rust": {
|
||||
"errorOnVersionRange": "^2.0.0-0",
|
||||
"version": true,
|
||||
"getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE \"s/^[^\\\"]*\\\"//; s/\\\".*//1p\"",
|
||||
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
|
||||
"prepublish": [
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf",
|
||||
"sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev",
|
||||
"cargo install cargo-audit --features=fix",
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
@@ -17,12 +17,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Cargo Audit\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -33,7 +28,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
@@ -45,12 +40,7 @@
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Cargo Publish\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -60,7 +50,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
@@ -80,19 +70,14 @@
|
||||
"javascript": {
|
||||
"errorOnVersionRange": "^2.0.0-0",
|
||||
"version": true,
|
||||
"getPublishedVersion": "npm view ${ pkgFile.pkg.name } version",
|
||||
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
|
||||
"prepublish": [
|
||||
{
|
||||
"command": "yarn",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Yarn Audit\n\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary>click to view</summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -115,12 +100,7 @@
|
||||
"publish": [
|
||||
"sleep 15s",
|
||||
{
|
||||
"command": "echo \"# Yarn Package Publish\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -130,7 +110,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
@@ -158,12 +138,7 @@
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Yarn Audit\n\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary>click to view</summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -185,12 +160,7 @@
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"command": "echo \"# Yarn Package Publish\"",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -200,7 +170,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```'",
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
@@ -239,7 +209,16 @@
|
||||
"path": "./core/tauri-build",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-codegen", "tauri-utils"],
|
||||
"postversion": "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
||||
"postversion": [
|
||||
"node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||
"cargo build --manifest-path ../config-schema/Cargo.toml"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"path": "./tooling/cli/schema.json",
|
||||
"name": "schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tauri": {
|
||||
"path": "./core/tauri",
|
||||
@@ -255,8 +234,12 @@
|
||||
"cli.js": {
|
||||
"path": "./tooling/cli/node",
|
||||
"manager": "javascript",
|
||||
"getPublishedVersion": "node ../../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
|
||||
"dependencies": ["cli.rs"],
|
||||
"postversion": "node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||
"postversion": [
|
||||
"node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||
"cargo build --manifest-path ../../../core/config-schema/Cargo.toml"
|
||||
],
|
||||
"prepublish": [],
|
||||
"publish": [],
|
||||
"postpublish": []
|
||||
@@ -265,7 +248,10 @@
|
||||
"path": "./tooling/cli",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-bundler", "tauri-utils"],
|
||||
"postversion": "cargo check",
|
||||
"postversion": [
|
||||
"cargo check",
|
||||
"cargo build --manifest-path ../../core/config-schema/Cargo.toml"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"path": "${ pkg.path }/target/package/tauri-cli-${ pkgFile.version }.crate",
|
||||
|
||||
5
.changes/content-protection-api.md
Normal file
5
.changes/content-protection-api.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"api": "minor"
|
||||
---
|
||||
|
||||
Added the `WindowOptions::contentProtected` option and `WebviewWindow#setContentProtected` to change it at runtime.
|
||||
5
.changes/content-protection-utils.md
Normal file
5
.changes/content-protection-utils.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": "patch"
|
||||
---
|
||||
|
||||
Added the `content_protected` option to the window configuration.
|
||||
7
.changes/content-protection.md
Normal file
7
.changes/content-protection.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri": "minor"
|
||||
"tauri-runtime": "minor"
|
||||
"tauri-runtime-wry": "minor"
|
||||
---
|
||||
|
||||
Added the `content_protected` option when creating a window and `Window::set_content_protected` to change it at runtime.
|
||||
5
.changes/core-js-Map.md
Normal file
5
.changes/core-js-Map.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
---
|
||||
|
||||
Fix serialization of js `Map` when used in `invoke`.
|
||||
5
.changes/core-navigation-handler.md
Normal file
5
.changes/core-navigation-handler.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Added `Window::on_navigation`.
|
||||
5
.changes/core-sync-windows-metadata.md
Normal file
5
.changes/core-sync-windows-metadata.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
---
|
||||
|
||||
Sync `__TAURI_METADATA__.__windows` across all windows.
|
||||
5
.changes/css-preprocessor-mime-type.md
Normal file
5
.changes/css-preprocessor-mime-type.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": patch
|
||||
---
|
||||
|
||||
Correctly determine mime type of `.less`, `.sass` and `.styl` files.
|
||||
5
.changes/custom-buttons-api.md
Normal file
5
.changes/custom-buttons-api.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"api": minor
|
||||
---
|
||||
|
||||
Allow setting the text of the dialog buttons.
|
||||
5
.changes/custom-buttons.md
Normal file
5
.changes/custom-buttons.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Added `OkWithLabel` and `OkCancelWithLabels` variants to the `api::dialog::MessageDialogButtons` enum to set the text of the dialog buttons.
|
||||
6
.changes/custom-icon.md
Normal file
6
.changes/custom-icon.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": minor
|
||||
"cli.js": minor
|
||||
---
|
||||
|
||||
Add `--png` option for the `icon` command to generate custom icon sizes.
|
||||
6
.changes/empty-tauri-key-password.md
Normal file
6
.changes/empty-tauri-key-password.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Skip the password prompt on the build command when `TAURI_KEY_PASSWORD` environment variable is empty and the `--ci` argument is provided or the `CI` environment variable is set.
|
||||
7
.changes/expose-set_device_event_filter-in-tauri-api.md
Normal file
7
.changes/expose-set_device_event_filter-in-tauri-api.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri-runtime-wry": minor
|
||||
"tauri-runtime": minor
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Added `Builder::device_event_filter` and `App::set_device_event_filter` methods.
|
||||
5
.changes/fix-2549.md
Normal file
5
.changes/fix-2549.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
---
|
||||
|
||||
Fix resize glitch when double clicking a custom titlebar in the top resize area.
|
||||
5
.changes/fix-5781.md
Normal file
5
.changes/fix-5781.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch'
|
||||
---
|
||||
|
||||
Fixed error during bundling process for the appimage target on subsequent bundling attempts.
|
||||
6
.changes/fix-dev-server-html-serialization.md
Normal file
6
.changes/fix-dev-server-html-serialization.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Fixes HTML serialization removing template tags on the dev server.
|
||||
6
.changes/fix-tray-events.md
Normal file
6
.changes/fix-tray-events.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes tray events not being delivered.
|
||||
5
.changes/glob-match-require_literal_separator.md
Normal file
5
.changes/glob-match-require_literal_separator.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
---
|
||||
|
||||
Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when `recursive` option was `false`.
|
||||
5
.changes/heck-unicode.md
Normal file
5
.changes/heck-unicode.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
---
|
||||
|
||||
Fix building apps with unicode characters in their `productName`.
|
||||
8
.changes/is-minimized.md
Normal file
8
.changes/is-minimized.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"tauri": minor
|
||||
"tauri-runtime": minor
|
||||
"tauri-runtime-wry": minor
|
||||
"api": minor
|
||||
---
|
||||
|
||||
Add `is_minimized()` window method.
|
||||
5
.changes/linux-mouse.md
Normal file
5
.changes/linux-mouse.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
---
|
||||
|
||||
Disable cursor mouse events on Linux.
|
||||
9
.changes/nsis-linux.md
Normal file
9
.changes/nsis-linux.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
"tauri-bundler": minor
|
||||
"tauri-utils": minor
|
||||
"cli.rs": minor
|
||||
"cli.js": minor
|
||||
"tauri-build": minor
|
||||
---
|
||||
|
||||
Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
8
.changes/nsis.md
Normal file
8
.changes/nsis.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"tauri-bundler": minor
|
||||
"tauri-utils": minor
|
||||
"cli.rs": minor
|
||||
"cli.js": minor
|
||||
---
|
||||
|
||||
Add `nsis` bundle target
|
||||
5
.changes/open-links-mail-tel.md
Normal file
5
.changes/open-links-mail-tel.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Added support to `mailto:` and `tel:` links on the shell API.
|
||||
5
.changes/pin-os-info.md
Normal file
5
.changes/pin-os-info.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Pin `os_info` to `=3.5`.
|
||||
7
.changes/pin-raw-window-handle.md
Normal file
7
.changes/pin-raw-window-handle.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri": patch
|
||||
"tauri-runtime": patch
|
||||
"tauri-runtime-wry": patch
|
||||
---
|
||||
|
||||
Pin raw-window-handle to 0.5.0 to keep MSRV.
|
||||
6
.changes/pin-time.md
Normal file
6
.changes/pin-time.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri": patch
|
||||
"tauri-codegen": patch
|
||||
---
|
||||
|
||||
Pin `time` to `0.3.15`.
|
||||
31
.changes/readme.md
Normal file
31
.changes/readme.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Changes
|
||||
|
||||
##### via https://github.com/jbolda/covector
|
||||
|
||||
As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
|
||||
|
||||
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
|
||||
|
||||
Use the following format:
|
||||
|
||||
```md
|
||||
---
|
||||
"package-a": patch
|
||||
"package-b": patch
|
||||
---
|
||||
|
||||
Change summary goes here
|
||||
|
||||
```
|
||||
|
||||
Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
|
||||
|
||||
Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
|
||||
|
||||
Given a version number MAJOR.MINOR.PATCH, increment the:
|
||||
|
||||
- MAJOR version when you make incompatible API changes,
|
||||
- MINOR version when you add functionality in a backwards compatible manner, and
|
||||
- PATCH version when you make backwards compatible bug fixes.
|
||||
|
||||
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
|
||||
5
.changes/runtime-navigation-handler.md
Normal file
5
.changes/runtime-navigation-handler.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime": minor
|
||||
---
|
||||
|
||||
Added `navigation_handler` field on `PendingWindow`.
|
||||
5
.changes/tauri-build-windows-manifest.md
Normal file
5
.changes/tauri-build-windows-manifest.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-build": "minor"
|
||||
---
|
||||
|
||||
Add `WindowsAttributes::app_manifest` to specify the application manifest on Windows.
|
||||
6
.changes/template-default-features.md
Normal file
6
.changes/template-default-features.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'cli.rs': minor
|
||||
'cli.js': minor
|
||||
---
|
||||
|
||||
Remove default features from Cargo.toml template.
|
||||
8
.changes/title-getter.md
Normal file
8
.changes/title-getter.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"tauri": "minor"
|
||||
"api": "minor"
|
||||
"tauri-runtime": "minor"
|
||||
"tauri-runtime-wry": "minor"
|
||||
---
|
||||
|
||||
Add `title` getter on window.
|
||||
6
.changes/tray-tooltip-runtime.md
Normal file
6
.changes/tray-tooltip-runtime.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-runtime": minor
|
||||
"tauri-runtime-wry": minor
|
||||
---
|
||||
|
||||
Added `TrayHandle::set_tooltip` and `SystemTray::with_tooltip`.
|
||||
5
.changes/tray-tooltip.md
Normal file
5
.changes/tray-tooltip.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Implement `SystemTray::with_tooltip` and `SystemTrayHandle::set_tooltip` for Windows and macOS.
|
||||
7
.changes/url-getter.md
Normal file
7
.changes/url-getter.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri-runtime": minor
|
||||
"tauri-runtime-wry": minor
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Added window's `url()` getter.
|
||||
6
.changes/version-inheritance.md
Normal file
6
.changes/version-inheritance.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'cli.rs': 'minor'
|
||||
'tauri-build': 'minor'
|
||||
---
|
||||
|
||||
Added support for Cargo's workspace inheritance for package information. The cli now also detects inherited `tauri` and `tauri-build` dependencies and disables manifest rewrites accordingly.
|
||||
7
.changes/webview-theme.md
Normal file
7
.changes/webview-theme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
"tauri-runtime": "patch"
|
||||
"tauri-runtime-wry": "patch"
|
||||
---
|
||||
|
||||
On Windows, change webview theme based on Window theme for more accurate `prefers-color-scheme` support.
|
||||
5
.changes/window-from-config.md
Normal file
5
.changes/window-from-config.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'minor'
|
||||
---
|
||||
|
||||
Add a method to the `WindowBuilder` struct to recreate windows from tauri.conf.json configurations.
|
||||
6
.changes/wix-launch-app-checked.md
Normal file
6
.changes/wix-launch-app-checked.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-bundler": "patch"
|
||||
---
|
||||
|
||||
On Windows, the `msi` installer's `Launch App` checkbox will be checked by default.
|
||||
|
||||
5
.changes/wry-navigation-handler.md
Normal file
5
.changes/wry-navigation-handler.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": minor
|
||||
---
|
||||
|
||||
Implement the webview navigation handler.
|
||||
@@ -5,7 +5,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
|
||||
|
||||
# Derived from Tauri contribution and setup guides:
|
||||
# See: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md#development-guide
|
||||
# See: https://tauri.studio/v1/guides/getting-started/prerequisites/#setting-up-linux
|
||||
# See: https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux
|
||||
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.0-dev wget"
|
||||
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
|
||||
@@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo
|
||||
|
||||
### A note on filesystem performance
|
||||
|
||||
Due to limititations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy opearations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
|
||||
To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).
|
||||
|
||||
|
||||
44
.docker/cross/aarch64.Dockerfile
Normal file
44
.docker/cross/aarch64.Dockerfile
Normal file
@@ -0,0 +1,44 @@
|
||||
FROM ubuntu:18.04
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY common.sh lib.sh /
|
||||
RUN /common.sh
|
||||
|
||||
COPY cmake.sh /
|
||||
RUN /cmake.sh
|
||||
|
||||
COPY xargo.sh /
|
||||
RUN /xargo.sh
|
||||
|
||||
RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
|
||||
g++-aarch64-linux-gnu \
|
||||
libc6-dev-arm64-cross
|
||||
|
||||
COPY deny-debian-packages.sh /
|
||||
RUN TARGET_ARCH=arm64 /deny-debian-packages.sh \
|
||||
binutils \
|
||||
binutils-aarch64-linux-gnu
|
||||
|
||||
COPY qemu.sh /
|
||||
RUN /qemu.sh aarch64 softmmu
|
||||
|
||||
COPY dropbear.sh /
|
||||
RUN /dropbear.sh
|
||||
|
||||
COPY linux-image.sh /
|
||||
RUN /linux-image.sh aarch64
|
||||
|
||||
COPY linux-runner /
|
||||
|
||||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="/linux-runner aarch64" \
|
||||
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
|
||||
CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \
|
||||
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu" \
|
||||
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu \
|
||||
RUST_TEST_THREADS=1 \
|
||||
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||
|
||||
RUN dpkg --add-architecture arm64
|
||||
RUN apt-get update
|
||||
RUN apt-get install --assume-yes --no-install-recommends libssl-dev:arm64 libdbus-1-dev:arm64 libsoup2.4-dev:arm64 libssl-dev:arm64 libgtk-3-dev:arm64 webkit2gtk-4.0-dev:arm64 libappindicator3-1:arm64 librsvg2-dev:arm64 patchelf:arm64
|
||||
31
.docker/cross/cmake.sh
Executable file
31
.docker/cross/cmake.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
main() {
|
||||
local version=3.23.1
|
||||
|
||||
install_packages curl
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-linux-x86_64.sh" -o cmake.sh
|
||||
sh cmake.sh --skip-license --prefix=/usr/local
|
||||
|
||||
popd
|
||||
|
||||
purge_packages
|
||||
|
||||
rm -rf "${td}"
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm "${0}"
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
40
.docker/cross/common.sh
Executable file
40
.docker/cross/common.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
# For architectures except amd64 and i386, look for packages on ports.ubuntu.com instead.
|
||||
# This is important if you enable additional architectures so you can install libraries to cross-compile against.
|
||||
# Look for 'dpkg --add-architecture' in the README for more details.
|
||||
if grep -i ubuntu /etc/os-release >/dev/null; then
|
||||
sed 's/http:\/\/\(.*\).ubuntu.com\/ubuntu\//[arch-=amd64,i386] http:\/\/ports.ubuntu.com\/ubuntu-ports\//g' /etc/apt/sources.list > /etc/apt/sources.list.d/ports.list
|
||||
sed -i 's/http:\/\/\(.*\).ubuntu.com\/ubuntu\//[arch=amd64,i386] http:\/\/\1.archive.ubuntu.com\/ubuntu\//g' /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
install_packages \
|
||||
autoconf \
|
||||
automake \
|
||||
binutils \
|
||||
ca-certificates \
|
||||
curl \
|
||||
file \
|
||||
gcc \
|
||||
git \
|
||||
libtool \
|
||||
m4 \
|
||||
make
|
||||
|
||||
if_centos install_packages \
|
||||
clang-devel \
|
||||
gcc-c++ \
|
||||
glibc-devel \
|
||||
pkgconfig
|
||||
|
||||
if_ubuntu install_packages \
|
||||
g++ \
|
||||
libc6-dev \
|
||||
libclang-dev \
|
||||
pkg-config
|
||||
19
.docker/cross/deny-debian-packages.sh
Executable file
19
.docker/cross/deny-debian-packages.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
main() {
|
||||
local package
|
||||
|
||||
for package in "${@}"; do
|
||||
echo "Package: ${package}:${TARGET_ARCH}
|
||||
Pin: release *
|
||||
Pin-Priority: -1" > "/etc/apt/preferences.d/${package}"
|
||||
echo "${package}"
|
||||
done
|
||||
|
||||
rm "${0}"
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
56
.docker/cross/dropbear.sh
Executable file
56
.docker/cross/dropbear.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
main() {
|
||||
local version=2022.82
|
||||
|
||||
install_packages \
|
||||
autoconf \
|
||||
automake \
|
||||
bzip2 \
|
||||
curl \
|
||||
make
|
||||
|
||||
if_centos install_packages zlib-devel
|
||||
if_ubuntu install_packages zlib1g-dev
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://matt.ucc.asn.au/dropbear/releases/dropbear-${version}.tar.bz2" -O
|
||||
tar --strip-components=1 -xjf "dropbear-${version}.tar.bz2"
|
||||
|
||||
# Remove some unwanted message
|
||||
sed -i '/skipping hostkey/d' cli-kex.c
|
||||
sed -i '/failed to identify current user/d' cli-runopts.c
|
||||
|
||||
./configure \
|
||||
--disable-syslog \
|
||||
--disable-shadow \
|
||||
--disable-lastlog \
|
||||
--disable-utmp \
|
||||
--disable-utmpx \
|
||||
--disable-wtmp \
|
||||
--disable-wtmpx \
|
||||
--disable-pututline \
|
||||
--disable-pututxline
|
||||
|
||||
make "-j$(nproc)" PROGRAMS=dbclient
|
||||
cp dbclient /usr/local/bin/
|
||||
|
||||
purge_packages
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
rm "${0}"
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
45
.docker/cross/lib.sh
Normal file
45
.docker/cross/lib.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
purge_list=()
|
||||
|
||||
install_packages() {
|
||||
if grep -i ubuntu /etc/os-release; then
|
||||
apt-get update
|
||||
|
||||
for pkg in "${@}"; do
|
||||
if ! dpkg -L "${pkg}" >/dev/null 2>/dev/null; then
|
||||
apt-get install --assume-yes --no-install-recommends "${pkg}"
|
||||
|
||||
purge_list+=( "${pkg}" )
|
||||
fi
|
||||
done
|
||||
else
|
||||
for pkg in "${@}"; do
|
||||
if ! yum list installed "${pkg}" >/dev/null 2>/dev/null; then
|
||||
yum install -y "${pkg}"
|
||||
|
||||
purge_list+=( "${pkg}" )
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
purge_packages() {
|
||||
if (( ${#purge_list[@]} )); then
|
||||
if grep -i ubuntu /etc/os-release; then
|
||||
apt-get purge --assume-yes --auto-remove "${purge_list[@]}"
|
||||
else
|
||||
yum remove -y "${purge_list[@]}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if_centos() {
|
||||
if grep -q -i centos /etc/os-release; then
|
||||
eval "${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
if_ubuntu() {
|
||||
if grep -q -i ubuntu /etc/os-release; then
|
||||
eval "${@}"
|
||||
fi
|
||||
}
|
||||
274
.docker/cross/linux-image.sh
Executable file
274
.docker/cross/linux-image.sh
Executable file
@@ -0,0 +1,274 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
main() {
|
||||
# arch in the rust target
|
||||
local arch="${1}" \
|
||||
kversion=4.19.0-20
|
||||
|
||||
local debsource="deb http://http.debian.net/debian/ buster main"
|
||||
debsource="${debsource}\ndeb http://security.debian.org/ buster/updates main"
|
||||
|
||||
local dropbear="dropbear-bin"
|
||||
|
||||
local -a deps
|
||||
local kernel=
|
||||
local libgcc="libgcc1"
|
||||
|
||||
# select debian arch and kernel version
|
||||
case "${arch}" in
|
||||
aarch64)
|
||||
arch=arm64
|
||||
kernel="${kversion}-arm64"
|
||||
;;
|
||||
armv7)
|
||||
arch=armhf
|
||||
kernel="${kversion}-armmp"
|
||||
;;
|
||||
i686)
|
||||
arch=i386
|
||||
kernel="${kversion}-686"
|
||||
;;
|
||||
mips|mipsel)
|
||||
kernel="${kversion}-4kc-malta"
|
||||
;;
|
||||
mips64el)
|
||||
kernel="${kversion}-5kc-malta"
|
||||
;;
|
||||
powerpc)
|
||||
# there is no buster powerpc port, so we use jessie
|
||||
# use a more recent kernel from backports
|
||||
kversion='4.9.0-0.bpo.6'
|
||||
kernel="${kversion}-powerpc"
|
||||
debsource="deb http://archive.debian.org/debian jessie main"
|
||||
debsource="${debsource}\ndeb http://archive.debian.org/debian jessie-backports main"
|
||||
debsource="${debsource}\ndeb http://ftp.ports.debian.org/debian-ports unstable main"
|
||||
debsource="${debsource}\ndeb http://ftp.ports.debian.org/debian-ports unreleased main"
|
||||
|
||||
# archive.debian.org Release files are expired.
|
||||
echo "Acquire::Check-Valid-Until false;" | tee -a /etc/apt/apt.conf.d/10-nocheckvalid
|
||||
echo "APT::Get::AllowUnauthenticated true;" | tee -a /etc/apt/apt.conf.d/10-nocheckvalid
|
||||
|
||||
dropbear="dropbear"
|
||||
deps=(libcrypt1:"${arch}")
|
||||
;;
|
||||
powerpc64)
|
||||
# there is no stable port
|
||||
arch=ppc64
|
||||
# https://packages.debian.org/en/sid/linux-image-powerpc64
|
||||
kversion='5.*'
|
||||
kernel="${kversion}-powerpc64"
|
||||
libgcc="libgcc-s1"
|
||||
debsource="deb http://ftp.ports.debian.org/debian-ports unstable main"
|
||||
debsource="${debsource}\ndeb http://ftp.ports.debian.org/debian-ports unreleased main"
|
||||
# sid version of dropbear requires these dependencies
|
||||
deps=(libcrypt1:"${arch}")
|
||||
;;
|
||||
powerpc64le)
|
||||
arch=ppc64el
|
||||
kernel="${kversion}-powerpc64le"
|
||||
;;
|
||||
s390x)
|
||||
arch=s390x
|
||||
kernel="${kversion}-s390x"
|
||||
;;
|
||||
sparc64)
|
||||
# there is no stable port
|
||||
# https://packages.debian.org/en/sid/linux-image-sparc64
|
||||
kernel='*-sparc64'
|
||||
libgcc="libgcc-s1"
|
||||
debsource="deb http://ftp.ports.debian.org/debian-ports unstable main"
|
||||
debsource="${debsource}\ndeb http://ftp.ports.debian.org/debian-ports unreleased main"
|
||||
# sid version of dropbear requires these dependencies
|
||||
deps=(libcrypt1:"${arch}")
|
||||
;;
|
||||
x86_64)
|
||||
arch=amd64
|
||||
kernel="${kversion}-amd64"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid arch: ${arch}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
install_packages ca-certificates \
|
||||
curl \
|
||||
cpio \
|
||||
sharutils \
|
||||
gnupg
|
||||
|
||||
# Download packages
|
||||
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
echo -e "${debsource}" > /etc/apt/sources.list
|
||||
|
||||
# Old ubuntu does not support --add-architecture, so we directly change multiarch file
|
||||
if [ -f /etc/dpkg/dpkg.cfg.d/multiarch ]; then
|
||||
cp /etc/dpkg/dpkg.cfg.d/multiarch /etc/dpkg/dpkg.cfg.d/multiarch.bak
|
||||
fi
|
||||
dpkg --add-architecture "${arch}" || echo "foreign-architecture ${arch}" > /etc/dpkg/dpkg.cfg.d/multiarch
|
||||
|
||||
# Add Debian keys.
|
||||
curl --retry 3 -sSfL 'https://ftp-master.debian.org/keys/archive-key-{7.0,8,9,10}.asc' -O
|
||||
curl --retry 3 -sSfL 'https://ftp-master.debian.org/keys/archive-key-{8,9,10}-security.asc' -O
|
||||
curl --retry 3 -sSfL 'https://ftp-master.debian.org/keys/release-{7,8,9,10}.asc' -O
|
||||
curl --retry 3 -sSfL 'https://www.ports.debian.org/archive_{2020,2021,2022}.key' -O
|
||||
|
||||
for key in *.asc *.key; do
|
||||
apt-key add "${key}"
|
||||
rm "${key}"
|
||||
done
|
||||
|
||||
# allow apt-get to retry downloads
|
||||
echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries
|
||||
|
||||
apt-get update
|
||||
|
||||
mkdir -p "/qemu/${arch}"
|
||||
chmod 777 /qemu "/qemu/${arch}"
|
||||
|
||||
cd "/qemu/${arch}"
|
||||
apt-get -d --no-install-recommends download \
|
||||
${deps[@]+"${deps[@]}"} \
|
||||
"busybox:${arch}" \
|
||||
"${dropbear}:${arch}" \
|
||||
"libtommath1:${arch}" \
|
||||
"libtomcrypt1:${arch}" \
|
||||
"libgmp10:${arch}" \
|
||||
"libc6:${arch}" \
|
||||
"${libgcc}:${arch}" \
|
||||
"libstdc++6:${arch}" \
|
||||
"linux-image-${kernel}:${arch}" \
|
||||
ncurses-base \
|
||||
"zlib1g:${arch}"
|
||||
cd /qemu
|
||||
|
||||
# Install packages
|
||||
root="root-${arch}"
|
||||
mkdir -p "${root}"/{bin,etc/dropbear,root,sys,dev,proc,sbin,tmp,usr/{bin,sbin},var/log}
|
||||
for deb in "${arch}"/*deb; do
|
||||
dpkg -x "${deb}" "${root}"/
|
||||
done
|
||||
|
||||
cp "${root}/boot/vmlinu"* kernel
|
||||
|
||||
# initrd
|
||||
mkdir -p "${root}/modules"
|
||||
cp -v \
|
||||
"${root}/lib/modules"/*/kernel/drivers/net/net_failover.ko \
|
||||
"${root}/lib/modules"/*/kernel/drivers/net/virtio_net.ko \
|
||||
"${root}/lib/modules"/*/kernel/drivers/virtio/* \
|
||||
"${root}/lib/modules"/*/kernel/fs/netfs/netfs.ko \
|
||||
"${root}/lib/modules"/*/kernel/fs/9p/9p.ko \
|
||||
"${root}/lib/modules"/*/kernel/fs/fscache/fscache.ko \
|
||||
"${root}/lib/modules"/*/kernel/net/9p/9pnet.ko \
|
||||
"${root}/lib/modules"/*/kernel/net/9p/9pnet_virtio.ko \
|
||||
"${root}/lib/modules"/*/kernel/net/core/failover.ko \
|
||||
"${root}/modules" || true # some file may not exist
|
||||
rm -rf "${root:?}/boot"
|
||||
rm -rf "${root:?}/lib/modules"
|
||||
|
||||
cat << 'EOF' > "${root}/etc/hosts"
|
||||
127.0.0.1 localhost qemu
|
||||
EOF
|
||||
|
||||
cat << 'EOF' > $root/etc/hostname
|
||||
qemu
|
||||
EOF
|
||||
|
||||
cat << 'EOF' > $root/etc/passwd
|
||||
root::0:0:root:/root:/bin/sh
|
||||
EOF
|
||||
|
||||
cat << 'EOF' | uudecode -o $root/etc/dropbear/dropbear_rsa_host_key
|
||||
begin 600 dropbear_rsa_host_key
|
||||
M````!W-S:"UR<V$````#`0`!```!`0"N!-<%K,3Z.!Z,OEMB2.N\O.$IWQ*F
|
||||
M#5%(_;(^2YKY_J_.RQW/7U@_MK&J#!Z0_\;EH#98ZW*E1\.<FF%P/*Y.W56-
|
||||
M31.'EJE`TN@=T5EC(8"Y%3'ZBYH)^WIVJ]S*G/_;#RH\_?S"U^1L_<<.F`O+
|
||||
MZVI?*]\KTDOT&QV0#B-M;"%_7:\>+3[X=QMH,B<HM$+0E[\B6*^!XKLR@V,K
|
||||
M)<V80HHK:_#;D]26XKN&CB./EZAC%4)78R!G""4HT@UK<5I4B^$/""`,?*\T
|
||||
M>*4$RYULV,V3X6]K:7@Q?80"#WXGGQZNFN6CZ7LTDX(F6J[\]F5<0`HEOF:Z
|
||||
MX;^53`L'4I/A```!``$L:$Z*#6<^3@+O%.[-#/5H+.C'3\#QQZN[1;J>L`8I
|
||||
MZ_&T'!"J'/Y+?R?55G:M^=]R*-&I3TOJYZA8@&H51ZOAF59'1_>>Z@?E4#)$
|
||||
MQU)X/RWH51ZB5KSDWJS:D'7GD(!?NAY`C'7\)I:_4)J")QBV/P"RJQGHG'%B
|
||||
M1BT2LE6676>`1K,0\NIMZTKQNB(IC+88<7#8%_-=P<&6<"9LH>60TSS?3?-C
|
||||
MN`T36YB/3^<(Q;`N1NT>I9EZS`BAC^-?.:,R\7EL"<4>7E=]^1]B\K9])AQU
|
||||
MBM\]M;4V(S(6KH-I.4[6>9E+@\UEM.J6:[2LUEEJDG:G:+:/EVF^Y75@(S$`
|
||||
M``"!`.O+KW=&*CBCHL"11&SVO4/K]$R-]7MV7,3RR)Q[X'0;6.?4JHW!3VR6
|
||||
M*FGBY--37ZD-+UV.8_+"$<?B"#&K$.[V)F7V2\UY!7(0FZ@A2`0ADDY*J-_B
|
||||
M4AU&.*GP#F/!I([:?E],.>6PH9)(/E.\G19#G0K`LRM?JWS!58&;D0C1````
|
||||
M@0"\[@NYWSTW(?Q@:_A*1Y3/AKYO5?S=0"<2>#V-AH6W-NCSDTSRP=2D79FS
|
||||
M"D?[;.)V>8'#9&I3"MU@+:2\Z%$0-MG0+J'(0>T1_C6?*C=4U0I$DI<=@D]1
|
||||
H_&DE8Y(OT%%EPG]!$H&5HX*),_D1A2\P=R.7G'`0L%YM-79Y"T">$0``
|
||||
`
|
||||
end
|
||||
EOF
|
||||
|
||||
# dropbear complains when this file is missing
|
||||
touch "${root}/var/log/lastlog"
|
||||
|
||||
cat << 'EOF' > $root/init
|
||||
#!/bin/busybox sh
|
||||
|
||||
set -e
|
||||
|
||||
/bin/busybox --install
|
||||
|
||||
mount -t devtmpfs devtmpfs /dev
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mkdir /dev/pts
|
||||
mount -t devpts none /dev/pts/
|
||||
|
||||
# some archs does not have virtio modules
|
||||
insmod /modules/failover.ko || true
|
||||
insmod /modules/net_failover.ko || true
|
||||
insmod /modules/virtio.ko || true
|
||||
insmod /modules/virtio_ring.ko || true
|
||||
insmod /modules/virtio_mmio.ko || true
|
||||
insmod /modules/virtio_pci_legacy_dev.ko || true
|
||||
insmod /modules/virtio_pci_modern_dev.ko || true
|
||||
insmod /modules/virtio_pci.ko || true
|
||||
insmod /modules/virtio_net.ko || true
|
||||
insmod /modules/netfs.ko || true
|
||||
insmod /modules/fscache.ko
|
||||
insmod /modules/9pnet.ko
|
||||
insmod /modules/9pnet_virtio.ko || true
|
||||
insmod /modules/9p.ko
|
||||
|
||||
ifconfig lo 127.0.0.1
|
||||
ifconfig eth0 10.0.2.15
|
||||
route add default gw 10.0.2.2 eth0
|
||||
|
||||
mkdir /target
|
||||
mount -t 9p -o trans=virtio target /target -oversion=9p2000.u || true
|
||||
|
||||
exec dropbear -F -E -B
|
||||
EOF
|
||||
|
||||
chmod +x "${root}/init"
|
||||
cd "${root}"
|
||||
find . | cpio --create --format='newc' --quiet | gzip > ../initrd.gz
|
||||
cd -
|
||||
|
||||
# Clean up
|
||||
rm -rf "/qemu/${root}" "/qemu/${arch}"
|
||||
mv -f /etc/apt/sources.list.bak /etc/apt/sources.list
|
||||
if [ -f /etc/dpkg/dpkg.cfg.d/multiarch.bak ]; then
|
||||
mv /etc/dpkg/dpkg.cfg.d/multiarch.bak /etc/dpkg/dpkg.cfg.d/multiarch
|
||||
fi
|
||||
# can fail if arch is used (amd64 and/or i386)
|
||||
dpkg --remove-architecture "${arch}" || true
|
||||
apt-get update
|
||||
|
||||
purge_packages
|
||||
|
||||
ls -lh /qemu
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
173
.docker/cross/linux-runner
Executable file
173
.docker/cross/linux-runner
Executable file
@@ -0,0 +1,173 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
LOG=/tmp/qemu.log
|
||||
LOCK=/tmp/qemu.lock
|
||||
|
||||
if [ -n "${CROSS_DEBUG}" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# arch in the rust target
|
||||
arch="${1}"
|
||||
shift
|
||||
|
||||
if [ "${CROSS_RUNNER}" = "" ]; then
|
||||
if [[ "${arch}" == i?86 ]] || [[ "${arch}" == x86_64 ]]; then
|
||||
CROSS_RUNNER=native
|
||||
else
|
||||
CROSS_RUNNER=qemu-user
|
||||
fi
|
||||
fi
|
||||
|
||||
# select qemu arch
|
||||
qarch="${arch}"
|
||||
case "${arch}" in
|
||||
armv7)
|
||||
qarch="arm"
|
||||
;;
|
||||
i686)
|
||||
qarch="i386"
|
||||
;;
|
||||
powerpc)
|
||||
qarch="ppc"
|
||||
;;
|
||||
powerpc64)
|
||||
qarch="ppc64"
|
||||
;;
|
||||
powerpc64le)
|
||||
if [ "${CROSS_RUNNER}" = "qemu-user" ]; then
|
||||
qarch="ppc64le"
|
||||
else
|
||||
qarch="ppc64"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${CROSS_RUNNER}" in
|
||||
native)
|
||||
exec "${@}"
|
||||
;;
|
||||
qemu-user)
|
||||
exec "qemu-${qarch}" "${@}"
|
||||
;;
|
||||
qemu-system)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
echo "Invalid runner: \"${CROSS_RUNNER}\"";
|
||||
echo "Valid runners are: native, qemu-user and qemu-system"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
n="$(nproc)"
|
||||
memory=1G
|
||||
driver9p="virtio-9p-pci"
|
||||
drivernet="virtio-net-pci"
|
||||
|
||||
# select qemu parameters
|
||||
case "${arch}" in
|
||||
aarch64)
|
||||
# 8 is the max number of cpu supported by qemu-aarch64
|
||||
n=$(( n > 8 ? 8 : n ))
|
||||
opt="-machine virt -cpu cortex-a57"
|
||||
;;
|
||||
armv7)
|
||||
opt="-machine virt"
|
||||
driver9p="virtio-9p-device"
|
||||
drivernet="virtio-net-device"
|
||||
;;
|
||||
i686)
|
||||
opt="-append console=ttyS0"
|
||||
;;
|
||||
mips|mipsel)
|
||||
# avoid kernel error
|
||||
# https://blahcat.github.io/2017/07/14/building-a-debian-stretch-qemu-image-for-mipsel/
|
||||
opt="-append nokaslr"
|
||||
n=1
|
||||
;;
|
||||
mips64el)
|
||||
# avoid kernel error
|
||||
# https://blahcat.github.io/2017/07/14/building-a-debian-stretch-qemu-image-for-mipsel/
|
||||
opt="-append nokaslr -cpu MIPS64R2-generic"
|
||||
n=1
|
||||
;;
|
||||
powerpc)
|
||||
opt="-append console=ttyPZ0"
|
||||
n=1
|
||||
;;
|
||||
powerpc64|powerpc64le)
|
||||
opt="-append console=hvc0 --nodefaults -serial stdio"
|
||||
;;
|
||||
s390x)
|
||||
n=1
|
||||
driver9p="virtio-9p-ccw"
|
||||
drivernet="virtio-net-ccw"
|
||||
;;
|
||||
sparc64)
|
||||
n=1
|
||||
driver9p+=",bus=pciB"
|
||||
drivernet+=",bus=pciB"
|
||||
;;
|
||||
x86_64)
|
||||
opt="-append console=ttyS0"
|
||||
;;
|
||||
esac
|
||||
|
||||
(
|
||||
flock -n 200 || exit 0
|
||||
|
||||
echo Booting QEMU virtual machine with $n cpus...
|
||||
|
||||
QEMU_CMD="qemu-system-${qarch} \
|
||||
-m ${memory} \
|
||||
-smp ${n} \
|
||||
-nographic \
|
||||
-monitor none \
|
||||
-netdev user,id=net0,hostfwd=tcp::10022-:22 \
|
||||
-device ${drivernet},netdev=net0 \
|
||||
-kernel /qemu/kernel \
|
||||
-initrd /qemu/initrd.gz \
|
||||
${opt} \
|
||||
-fsdev local,id=fs0,path=/target,security_model=mapped \
|
||||
-device ${driver9p},fsdev=fs0,mount_tag=target"
|
||||
|
||||
touch "${LOG}"
|
||||
if [[ -n "${CROSS_DEBUG}" ]]; then
|
||||
(${QEMU_CMD} 2>&1 | tee -a "${LOG}") &
|
||||
else
|
||||
${QEMU_CMD} >> "${LOG}" 2>&1 &
|
||||
fi
|
||||
|
||||
# wait for dropbear
|
||||
for _ in $(seq 240); do
|
||||
if grep -q "Not backgrounding" "${LOG}"; then
|
||||
READY=1
|
||||
break
|
||||
fi
|
||||
sleep 0.5s
|
||||
done
|
||||
|
||||
if [ -z "${READY}" ]; then
|
||||
if [ -n "${CROSS_DEBUG}" ]; then
|
||||
echo "Not ready but continuing because CROSS_DEBUG is set"
|
||||
else
|
||||
echo "Qemu is not ready after ${SECONDS} seconds..."
|
||||
echo "Set the environment variable CROSS_DEBUG=1 to debug"
|
||||
echo "Last 100 lines of qemu output:"
|
||||
tail -n 100 "${LOG}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Booted in ${SECONDS} seconds"
|
||||
|
||||
) 200>"${LOCK}"
|
||||
|
||||
if [[ -t 1 ]] && [[ -t 2 ]]; then
|
||||
tty_flag='-t'
|
||||
fi
|
||||
|
||||
exec dbclient ${tty_flag} -p 10022 -y -y root@localhost "${@}"
|
||||
233
.docker/cross/qemu.sh
Executable file
233
.docker/cross/qemu.sh
Executable file
@@ -0,0 +1,233 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
build_static_libffi () {
|
||||
local version=3.0.13
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
|
||||
curl --retry 3 -sSfL "https://github.com/libffi/libffi/archive/refs/tags/v${version}.tar.gz" -O -L
|
||||
tar --strip-components=1 -xzf "v${version}.tar.gz"
|
||||
./configure --prefix="$td"/lib --disable-builddir --disable-shared --enable-static
|
||||
make "-j$(nproc)"
|
||||
install -m 644 ./.libs/libffi.a /usr/lib64/
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
}
|
||||
|
||||
build_static_libmount () {
|
||||
local version_spec=2.23.2
|
||||
local version=2.23
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://kernel.org/pub/linux/utils/util-linux/v${version}/util-linux-${version_spec}.tar.xz" -O -L
|
||||
tar --strip-components=1 -xJf "util-linux-${version_spec}.tar.xz"
|
||||
./configure --disable-shared --enable-static --without-ncurses
|
||||
make "-j$(nproc)" mount blkid
|
||||
install -m 644 ./.libs/*.a /usr/lib64/
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
}
|
||||
|
||||
|
||||
build_static_libattr() {
|
||||
local version=2.4.46
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
yum install -y gettext
|
||||
|
||||
curl --retry 3 -sSfL "https://download.savannah.nongnu.org/releases/attr/attr-${version}.src.tar.gz" -O
|
||||
tar --strip-components=1 -xzf "attr-${version}.src.tar.gz"
|
||||
cp /usr/share/automake*/config.* .
|
||||
|
||||
./configure
|
||||
make "-j$(nproc)"
|
||||
install -m 644 ./libattr/.libs/libattr.a /usr/lib64/
|
||||
|
||||
yum remove -y gettext
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
}
|
||||
|
||||
build_static_libcap() {
|
||||
local version=2.22
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-${version}.tar.xz" -O
|
||||
tar --strip-components=1 -xJf "libcap-${version}.tar.xz"
|
||||
make "-j$(nproc)"
|
||||
install -m 644 libcap/libcap.a /usr/lib64/
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
}
|
||||
|
||||
build_static_pixman() {
|
||||
local version=0.34.0
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://www.cairographics.org/releases/pixman-${version}.tar.gz" -O
|
||||
tar --strip-components=1 -xzf "pixman-${version}.tar.gz"
|
||||
./configure
|
||||
make "-j$(nproc)"
|
||||
install -m 644 ./pixman/.libs/libpixman-1.a /usr/lib64/
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
}
|
||||
|
||||
main() {
|
||||
local version=5.1.0
|
||||
|
||||
if_centos version=4.2.1
|
||||
|
||||
local arch="${1}" \
|
||||
softmmu="${2:-}"
|
||||
|
||||
install_packages \
|
||||
autoconf \
|
||||
automake \
|
||||
bison \
|
||||
bzip2 \
|
||||
curl \
|
||||
flex \
|
||||
libtool \
|
||||
make \
|
||||
patch \
|
||||
python3 \
|
||||
|
||||
if_centos install_packages \
|
||||
gcc-c++ \
|
||||
pkgconfig \
|
||||
xz \
|
||||
glib2-devel \
|
||||
glib2-static \
|
||||
glibc-static \
|
||||
libattr-devel \
|
||||
libcap-devel \
|
||||
libfdt-devel \
|
||||
pcre-static \
|
||||
pixman-devel \
|
||||
libselinux-devel \
|
||||
libselinux-static \
|
||||
libffi \
|
||||
libuuid-devel \
|
||||
libblkid-devel \
|
||||
libmount-devel \
|
||||
zlib-devel \
|
||||
zlib-static
|
||||
|
||||
if_centos 'curl --retry 3 -sSfL "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" -o /usr/share/automake*/config.guess'
|
||||
if_centos 'curl --retry 3 -sSfL "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" -o /usr/share/automake*/config.sub'
|
||||
|
||||
# these are not packaged as static libraries in centos; build them manually
|
||||
if_centos build_static_libffi
|
||||
if_centos build_static_libmount
|
||||
if_centos build_static_libattr
|
||||
if_centos build_static_libcap
|
||||
if_centos build_static_pixman
|
||||
|
||||
if_ubuntu install_packages \
|
||||
g++ \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
libattr1-dev \
|
||||
libcap-ng-dev \
|
||||
libffi-dev \
|
||||
libglib2.0-dev \
|
||||
libpixman-1-dev \
|
||||
libselinux1-dev \
|
||||
zlib1g-dev
|
||||
|
||||
# if we have python3.6+, we can install qemu 6.1.0, which needs ninja-build
|
||||
# ubuntu 16.04 only provides python3.5, so remove when we have a newer qemu.
|
||||
is_ge_python36=$(python3 -c "import sys; print(int(sys.version_info >= (3, 6)))")
|
||||
if [[ "${is_ge_python36}" == "1" ]]; then
|
||||
if_ubuntu version=6.1.0
|
||||
if_ubuntu install_packages ninja-build
|
||||
fi
|
||||
|
||||
local td
|
||||
td="$(mktemp -d)"
|
||||
|
||||
pushd "${td}"
|
||||
|
||||
curl --retry 3 -sSfL "https://download.qemu.org/qemu-${version}.tar.xz" -O
|
||||
tar --strip-components=1 -xJf "qemu-${version}.tar.xz"
|
||||
|
||||
local targets="${arch}-linux-user"
|
||||
local virtfs=""
|
||||
case "${softmmu}" in
|
||||
softmmu)
|
||||
if [ "${arch}" = "ppc64le" ]; then
|
||||
targets="${targets},ppc64-softmmu"
|
||||
else
|
||||
targets="${targets},${arch}-softmmu"
|
||||
fi
|
||||
virtfs="--enable-virtfs"
|
||||
;;
|
||||
"")
|
||||
true
|
||||
;;
|
||||
*)
|
||||
echo "Invalid softmmu option: ${softmmu}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
./configure \
|
||||
--disable-kvm \
|
||||
--disable-vnc \
|
||||
--disable-guest-agent \
|
||||
--enable-linux-user \
|
||||
--static \
|
||||
${virtfs} \
|
||||
--target-list="${targets}"
|
||||
make "-j$(nproc)"
|
||||
make install
|
||||
|
||||
# HACK the binfmt_misc interpreter we'll use expects the QEMU binary to be
|
||||
# in /usr/bin. Create an appropriate symlink
|
||||
ln -s "/usr/local/bin/qemu-${arch}" "/usr/bin/qemu-${arch}-static"
|
||||
|
||||
purge_packages
|
||||
|
||||
popd
|
||||
|
||||
rm -rf "${td}"
|
||||
rm "${0}"
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
28
.docker/cross/xargo.sh
Executable file
28
.docker/cross/xargo.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -euo pipefail
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. lib.sh
|
||||
|
||||
main() {
|
||||
install_packages ca-certificates curl
|
||||
|
||||
export RUSTUP_HOME=/tmp/rustup
|
||||
export CARGO_HOME=/tmp/cargo
|
||||
|
||||
curl --retry 3 -sSfL https://sh.rustup.rs -o rustup-init.sh
|
||||
sh rustup-init.sh -y --no-modify-path --profile minimal
|
||||
rm rustup-init.sh
|
||||
|
||||
PATH="${CARGO_HOME}/bin:${PATH}" cargo install xargo --root /usr/local
|
||||
|
||||
rm -r "${RUSTUP_HOME}" "${CARGO_HOME}"
|
||||
|
||||
purge_packages
|
||||
|
||||
rm "${0}"
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
2
.github/CODE_OF_CONDUCT.md
vendored
2
.github/CODE_OF_CONDUCT.md
vendored
@@ -61,7 +61,7 @@ representative at an online or offline event.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
[contact@tauri.studio](mailto:contact@tauri.studio).
|
||||
[contact@tauri.app](mailto:contact@tauri.app).
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
|
||||
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@@ -48,9 +48,9 @@ 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/guides/getting-started/prerequisites/) 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.
|
||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) 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.
|
||||
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 repository in order to run correctly.
|
||||
|
||||
### Packages Overview
|
||||
|
||||
@@ -87,4 +87,4 @@ The JS API provides bindings between the developer's JS in the Webview and the b
|
||||
|
||||
## Financial Contribution
|
||||
|
||||
Tauri is an MIT-licensed open source project. Its ongoing development can be supported via [Github Sponsors](https://github.com/sponsors/nothingismagick) or [Open Collective](https://opencollective.com/tauri). We prefer Github Sponsors as donations made are doubled through the matching fund program.
|
||||
Tauri is an MIT-licensed open source project. Its ongoing development can be supported via [GitHub Sponsors](https://github.com/sponsors/nothingismagick) or [Open Collective](https://opencollective.com/tauri). We prefer GitHub Sponsors as donations made are doubled through the matching fund program.
|
||||
|
||||
6
.github/FUNDING.yml
vendored
6
.github/FUNDING.yml
vendored
@@ -1,6 +1,10 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: nothingismagick
|
||||
github: tauri-apps
|
||||
patreon: #
|
||||
open_collective: tauri
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: 🐞 Bug Report
|
||||
title: '[bug] '
|
||||
description: Report a bug
|
||||
@@ -43,7 +47,7 @@ body:
|
||||
attributes:
|
||||
label: Platform and versions
|
||||
description: "Output of `npm run tauri info` or `cargo tauri info`"
|
||||
render: shell
|
||||
render: text
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -51,8 +55,8 @@ body:
|
||||
id: logs
|
||||
attributes:
|
||||
label: Stack trace
|
||||
render: shell
|
||||
|
||||
render: text
|
||||
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
contact_links:
|
||||
- name: 💬 Discord Chat
|
||||
url: https://discord.com/invite/tauri
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: 💡 Feature Request
|
||||
title: '[feat] '
|
||||
description: Suggest an idea
|
||||
|
||||
3
.github/config.yml
vendored
3
.github/config.yml
vendored
@@ -0,0 +1,3 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
80
.github/workflows/artifacts-updater.yml
vendored
80
.github/workflows/artifacts-updater.yml
vendored
@@ -1,24 +1,19 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: updater test artifacts
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- next
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/artifacts-updater.yml'
|
||||
- 'core/tauri/**'
|
||||
- 'tooling/cli/**'
|
||||
- 'tooling/bundler/**'
|
||||
- 'examples/updater/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -26,7 +21,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-artifacs:
|
||||
build-artifacts:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
strategy:
|
||||
@@ -45,61 +40,13 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: |
|
||||
core -> ../target
|
||||
tooling/cli
|
||||
|
||||
- name: build and install cli.rs
|
||||
run: cargo install --path tooling/cli --force
|
||||
@@ -110,13 +57,14 @@ jobs:
|
||||
run: |
|
||||
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'
|
||||
working-directory: ./examples/updater
|
||||
run: |
|
||||
yarn install
|
||||
cargo tauri build
|
||||
cargo tauri build --verbose
|
||||
env:
|
||||
# Notarization (disabled)
|
||||
# FIXME: enable only on `dev` push maybe? as it take some times...
|
||||
@@ -130,15 +78,17 @@ jobs:
|
||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||
# Updater signature is exposed here to make sure it works in PR's
|
||||
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
TAURI_KEY_PASSWORD:
|
||||
# run on PRs and forks
|
||||
- name: build sample artifacts (updater)
|
||||
if: steps.enablecodesigning.outputs.enabled != 'true'
|
||||
working-directory: ./examples/updater
|
||||
run: |
|
||||
yarn install
|
||||
cargo tauri build
|
||||
cargo tauri build --verbose
|
||||
env:
|
||||
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
TAURI_KEY_PASSWORD:
|
||||
# upload assets
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
|
||||
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
68
.github/workflows/bench.yml
vendored
68
.github/workflows/bench.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: benches
|
||||
|
||||
on:
|
||||
@@ -9,8 +13,8 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
LC_ALL: en_US.UTF-8 # This prevents strace from changing it's number format to use commas.
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -23,7 +27,7 @@ jobs:
|
||||
matrix:
|
||||
rust: [nightly]
|
||||
platform:
|
||||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
|
||||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
@@ -34,72 +38,30 @@ jobs:
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
default: true
|
||||
components: rust-src
|
||||
target: ${{ matrix.platform.target }}
|
||||
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.10'
|
||||
architecture: x64
|
||||
|
||||
- name: install depedencies
|
||||
- name: install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf xvfb
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev xvfb
|
||||
wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb
|
||||
sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
||||
pip install memory_profiler
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache cargo state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: cache cargo `tooling/bench/tests` target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_benches
|
||||
with:
|
||||
path: tooling/bench/tests/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('tooling/bench/tests/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('tooling/bench/tests/Cargo.lock') }}
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-${{ matrix.rust }}-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: |
|
||||
core -> ../target
|
||||
tooling/bench/tests
|
||||
|
||||
- name: run benchmarks
|
||||
run: |
|
||||
@@ -126,7 +88,7 @@ jobs:
|
||||
git commit --message "Update Tauri benchmarks"
|
||||
git push origin gh-pages
|
||||
|
||||
- name: Worker info
|
||||
- name: Print worker info
|
||||
run: |
|
||||
cat /proc/cpuinfo
|
||||
cat /proc/meminfo
|
||||
|
||||
2
.github/workflows/change-status-on-PR.yml
vendored
2
.github/workflows/change-status-on-PR.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
96
.github/workflows/check-generated-files.yml
vendored
Normal file
96
.github/workflows/check-generated-files.yml
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Check generated files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/check-generated-files.yml'
|
||||
- 'tooling/api/src/**'
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- '.github/workflows/check-generated-files.yml'
|
||||
- 'tooling/api/src/**'
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
api: ${{ steps.filter.outputs.api }}
|
||||
schema: ${{ steps.filter.outputs.schema }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
api:
|
||||
- 'tooling/api/src/**'
|
||||
- 'tooling/api/docs/js-api.json'
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
schema:
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
|
||||
check-api:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.api == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: build api
|
||||
working-directory: tooling/api
|
||||
run: yarn && yarn build
|
||||
- name: check api
|
||||
run: |
|
||||
git restore tooling/api/docs/js-api.json
|
||||
./.scripts/ci/has-diff.sh
|
||||
|
||||
check-schema:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.schema == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: core -> ../target
|
||||
|
||||
- name: generate schema.json
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./core/config-schema/Cargo.toml
|
||||
|
||||
- name: check schema
|
||||
run: ./.scripts/ci/has-diff.sh
|
||||
28
.github/workflows/check-license-header.yml
vendored
Normal file
28
.github/workflows/check-license-header.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Check generated files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
added:
|
||||
- added: '**'
|
||||
- name: check header license on new files
|
||||
if: ${{ steps.filter.outputs.added == 'true' }}
|
||||
run: node check-license-header.js ${{ steps.filter.outputs.added_files }}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -16,8 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
platform: [ubuntu-latest, macos-latest]
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -31,61 +30,13 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev libfuse2
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: |
|
||||
core -> ../target
|
||||
tooling/cli
|
||||
|
||||
- name: build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
@@ -126,7 +77,7 @@ jobs:
|
||||
cache-dependency-path: tooling/*/yarn.lock
|
||||
|
||||
- name: cargo login
|
||||
run: cargo login ${{ secrets.crate_token }}
|
||||
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global user.name "${{ github.event.pusher.name }}"
|
||||
@@ -136,7 +87,7 @@ jobs:
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
id: covector
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
|
||||
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -145,7 +96,7 @@ jobs:
|
||||
|
||||
- name: Create Pull Request With Versions Bumped
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
uses: tauri-apps/create-pull-request@v3.4.1
|
||||
uses: tauri-apps/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: release/version-updates
|
||||
@@ -155,10 +106,12 @@ jobs:
|
||||
body: ${{ steps.covector.outputs.change }}
|
||||
|
||||
- name: Trigger doc update
|
||||
if: steps.covector.outputs.successfulPublish == 'true'
|
||||
if: |
|
||||
steps.covector.outputs.successfulPublish == 'true' &&
|
||||
steps.covector.outputs.packagesPublished != ''
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.TAURI_BOT_PAT }}
|
||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
repository: tauri-apps/tauri-docs
|
||||
event-type: update-docs
|
||||
|
||||
@@ -168,6 +121,17 @@ jobs:
|
||||
contains(steps.covector.outputs.packagesPublished, 'cli.rs')
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.TAURI_BOT_PAT }}
|
||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
repository: tauri-apps/tauri
|
||||
event-type: publish-clijs
|
||||
client-payload: '{"releaseId": "${{ steps.covector.outputs.cli.js-releaseId }}" }'
|
||||
|
||||
- name: Trigger cli.rs publishing workflow
|
||||
if: |
|
||||
steps.covector.outputs.successfulPublish == 'true' &&
|
||||
contains(steps.covector.outputs.packagesPublished, 'cli.rs')
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
repository: tauri-apps/tauri
|
||||
event-type: publish-clirs
|
||||
|
||||
137
.github/workflows/docker.yml
vendored
Normal file
137
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: docker
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#pull_request:
|
||||
# paths:
|
||||
# - '.docker/**'
|
||||
# - '.github/workflows/docker.yml'
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: install cross
|
||||
run: cargo install cross --git https://github.com/cross-rs/cross
|
||||
|
||||
- name: Upload cross
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cross
|
||||
path: '~/.cargo/bin/cross'
|
||||
if-no-files-found: error
|
||||
|
||||
- name: build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml
|
||||
|
||||
- name: Upload CLI
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-tauri
|
||||
path: tooling/cli/target/debug/cargo-tauri
|
||||
if-no-files-found: error
|
||||
|
||||
docker:
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- { name: 'aarch64-unknown-linux-gnu', filename: 'aarch64' }
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
default: true
|
||||
target: ${{ matrix.target.name }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Download cross
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: cross
|
||||
path: '~/.cargo/bin'
|
||||
|
||||
- name: Download CLI
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: cargo-tauri
|
||||
path: 'examples/api'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and export to Docker
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .docker/cross
|
||||
file: .docker/cross/${{ matrix.target.filename }}.Dockerfile
|
||||
load: true
|
||||
tags: ${{ matrix.target.name }}:latest
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd tooling/api
|
||||
yarn && yarn build
|
||||
cd ../../examples/api
|
||||
yarn
|
||||
. .setup-cross.sh
|
||||
chmod +x cargo-tauri
|
||||
chmod +x $HOME/.cargo/bin/cross
|
||||
./cargo-tauri build --runner cross --bundles deb --target ${{ matrix.target.name }} --verbose
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .docker/cross
|
||||
file: .docker/cross/${{ matrix.target.filename }}.Dockerfile
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}/${{ matrix.target.name }}:latest
|
||||
39
.github/workflows/lint-fmt-cli.yml
vendored
39
.github/workflows/lint-fmt-cli.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -16,7 +16,6 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -55,44 +54,14 @@ jobs:
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
- name: install Linux dependencies
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache cargo state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-
|
||||
ubuntu-latest-stable-
|
||||
ubuntu-latest-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-
|
||||
ubuntu-latest-stable-
|
||||
ubuntu-latest-
|
||||
workspaces: tooling/cli
|
||||
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
|
||||
51
.github/workflows/lint-fmt-core.yml
vendored
51
.github/workflows/lint-fmt-core.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -13,11 +13,11 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/lint-fmt-core.yml'
|
||||
- 'core/**'
|
||||
- '!core/tauri/scripts/**'
|
||||
- 'examples/**'
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
clippy:
|
||||
- { args: '', key: 'empty' }
|
||||
- {
|
||||
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart',
|
||||
args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart',
|
||||
key: 'all'
|
||||
}
|
||||
- { args: '--features custom-protocol', key: 'custom-protocol' }
|
||||
@@ -58,10 +58,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install webkit2gtk
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@@ -70,44 +71,10 @@ jobs:
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-
|
||||
ubuntu-latest-stable-
|
||||
ubuntu-latest-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
ubuntu-latest-stable-${{ env.cache-name }}-
|
||||
ubuntu-latest-stable-
|
||||
ubuntu-latest-
|
||||
workspaces: core -> ../target
|
||||
save-if: ${{ matrix.clippy.key == 'all' }}
|
||||
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
|
||||
2
.github/workflows/lint-js.yml
vendored
2
.github/workflows/lint-js.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: publish cli.js
|
||||
env:
|
||||
DEBUG: napi:*
|
||||
@@ -5,6 +9,10 @@ env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseId:
|
||||
description: 'ID of the cli.js release'
|
||||
required: true
|
||||
repository_dispatch:
|
||||
types: [publish-clijs]
|
||||
|
||||
@@ -194,7 +202,6 @@ jobs:
|
||||
- host: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
node:
|
||||
- '12'
|
||||
- '14'
|
||||
- '16'
|
||||
- '18'
|
||||
@@ -228,7 +235,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '12'
|
||||
- '14'
|
||||
- '16'
|
||||
- '18'
|
||||
@@ -255,7 +261,7 @@ jobs:
|
||||
- name: install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
- name: Test bindings
|
||||
run: yarn test
|
||||
test-linux-x64-musl-binding:
|
||||
@@ -266,7 +272,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '12'
|
||||
- '14'
|
||||
- '16'
|
||||
- '18'
|
||||
@@ -294,7 +299,7 @@ jobs:
|
||||
shell: bash
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev patchelf librsvg-dev gtk+3.0-dev
|
||||
apk add openssl-dev musl-dev glib-dev cairo-dev pkgconfig gdk-pixbuf-dev webkit2gtk-dev curl libappindicator-dev gtk+3.0-dev
|
||||
- name: Setup and run tests
|
||||
run: |
|
||||
yarn tauri --help
|
||||
@@ -314,7 +319,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '12'
|
||||
- '14'
|
||||
- '16'
|
||||
- '18'
|
||||
@@ -351,7 +355,7 @@ jobs:
|
||||
set -e
|
||||
export PATH=/usr/local/cargo/bin/:/usr/local/fnm:$PATH
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --no-install-recommends -y unzip webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
bash
|
||||
curl https://sh.rustup.rs -sSf | bash -s -- -y
|
||||
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "/usr/local/fnm" --skip-shell
|
||||
@@ -396,4 +400,5 @@ jobs:
|
||||
npm publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
|
||||
RELEASE_ID: ${{ github.event.client_payload.releaseId || github.event.inputs.releaseId }}
|
||||
91
.github/workflows/publish-cli-rs.yml
vendored
Normal file
91
.github/workflows/publish-cli-rs.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: publish cli.rs
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
on:
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: [publish-clirs]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- os: ubuntu-18.04
|
||||
rust_target: x86_64-unknown-linux-gnu
|
||||
ext: ''
|
||||
- os: macos-latest
|
||||
rust_target: x86_64-apple-darwin
|
||||
ext: ''
|
||||
- os: macos-latest
|
||||
rust_target: aarch64-apple-darwin
|
||||
ext: ''
|
||||
- os: windows-latest
|
||||
rust_target: x86_64-pc-windows-msvc
|
||||
ext: '.exe'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Setup Rust'
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.config.rust_target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: ${{ matrix.config.rust_target }}
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.config.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: Build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./tooling/cli/Cargo.toml --release
|
||||
|
||||
- name: Upload CLI
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
|
||||
path: tooling/cli/target/release/cargo-tauri${{ matrix.config.ext }}
|
||||
if-no-files-found: error
|
||||
|
||||
upload:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download built CLIs
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: outputs
|
||||
|
||||
- name: Pack archives
|
||||
run: ./.scripts/ci/pack-cli.sh
|
||||
|
||||
- name: Get CLI version
|
||||
run: echo "CLI_VERSION=$(cat tooling/cli/metadata.json | jq '."cli.js".version' -r)" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa
|
||||
with:
|
||||
tag_name: cli.rs-v${{ env.CLI_VERSION }}
|
||||
files: |
|
||||
outputs/cargo-tauri-*.zip
|
||||
outputs/cargo-tauri-*.tgz
|
||||
84
.github/workflows/test-bundler.yml
vendored
84
.github/workflows/test-bundler.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -16,7 +16,6 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -34,49 +33,15 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache bundler cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_bundler
|
||||
with:
|
||||
path: tooling/bundler/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: tooling/bundler
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
@@ -106,52 +71,19 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install minimal stable with clippy and rustfmt
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
default: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache bundler cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_bundler
|
||||
with:
|
||||
path: tooling/bundler/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: tooling/bundler
|
||||
|
||||
- name: clippy check
|
||||
uses: actions-rs/clippy-check@v1
|
||||
|
||||
62
.github/workflows/test-cli-js.yml
vendored
62
.github/workflows/test-cli-js.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -17,7 +17,6 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -35,6 +34,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install Rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@@ -51,61 +51,13 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache template cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_template
|
||||
with:
|
||||
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-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: |
|
||||
tooling/cli
|
||||
tooling/cli/node/test/jest/fixtures/empty/src-tauri
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 30
|
||||
|
||||
43
.github/workflows/test-cli-rs.yml
vendored
43
.github/workflows/test-cli-rs.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -16,7 +16,6 @@ on:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -34,6 +33,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@@ -46,44 +46,9 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: tooling/cli
|
||||
|
||||
- name: build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
|
||||
94
.github/workflows/test-core.yml
vendored
94
.github/workflows/test-core.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -13,12 +13,10 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/test-core.yml'
|
||||
- 'core/**'
|
||||
- 'examples/**'
|
||||
- 'tooling/cli/**'
|
||||
- '!core/tauri/scripts/**'
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -27,66 +25,62 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
test-tauri-core:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
platform:
|
||||
- {
|
||||
target: x86_64-pc-windows-msvc,
|
||||
os: windows-latest,
|
||||
toolchain: '1.61.0'
|
||||
}
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest,
|
||||
toolchain: '1.59.0'
|
||||
}
|
||||
- {
|
||||
target: x86_64-apple-darwin,
|
||||
os: macos-latest,
|
||||
toolchain: '1.59.0'
|
||||
}
|
||||
features:
|
||||
- {
|
||||
args: --no-default-features,
|
||||
key: no-default
|
||||
}
|
||||
- {
|
||||
args: --features api-all,
|
||||
key: api-all
|
||||
}
|
||||
- {
|
||||
args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
|
||||
key: all
|
||||
}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: ${{ matrix.platform.toolchain }}
|
||||
target: ${{ matrix.platform.target }}
|
||||
override: true
|
||||
default: true
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
if: contains(matrix.platform.target, 'unknown-linux')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
|
||||
|
||||
- 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 state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
||||
${{ matrix.platform }}-stable-
|
||||
${{ matrix.platform }}-
|
||||
workspaces: core -> ../target
|
||||
save-if: ${{ matrix.features.key == 'all' }}
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cargo test
|
||||
cargo test --features api-all
|
||||
cargo test --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart
|
||||
run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
|
||||
|
||||
225
.github/workflows/udeps.yml
vendored
225
.github/workflows/udeps.yml
vendored
@@ -1,20 +1,17 @@
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Udeps
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/udeps.yml'
|
||||
- 'core/**'
|
||||
- 'tooling/bundler/**'
|
||||
- 'tooling/cli/**'
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- next
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
||||
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
||||
|
||||
concurrency:
|
||||
@@ -22,26 +19,58 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
udeps:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
clippy:
|
||||
- {
|
||||
path: './core/tauri/Cargo.toml',
|
||||
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart'
|
||||
}
|
||||
- { path: './core/tauri-build/Cargo.toml', args: '--all-features' }
|
||||
- { path: './core/tauri-codegen/Cargo.toml', args: '--all-features' }
|
||||
- { path: './core/tauri-macros/Cargo.toml', args: '--all-features' }
|
||||
- { path: './core/tauri-runtime/Cargo.toml', args: '--all-features' }
|
||||
- {
|
||||
path: './core/tauri-runtime-wry/Cargo.toml',
|
||||
args: '--features devtools,system-tray,macos-private-api,objc-exception'
|
||||
}
|
||||
- { path: './core/tauri-utils/Cargo.toml', args: '--all-features' }
|
||||
- { path: './tooling/bundler/Cargo.toml', args: '--all-features' }
|
||||
- { path: './tooling/cli/Cargo.toml', args: '--all-features' }
|
||||
outputs:
|
||||
tauri: ${{ steps.filter.outputs.tauri }}
|
||||
build: ${{ steps.filter.outputs.build }}
|
||||
codegen: ${{ steps.filter.outputs.codegen }}
|
||||
macros: ${{ steps.filter.outputs.macros }}
|
||||
runtime: ${{ steps.filter.outputs.runtime }}
|
||||
wry: ${{ steps.filter.outputs.wry }}
|
||||
utils: ${{ steps.filter.outputs.utils }}
|
||||
bundler: ${{ steps.filter.outputs.bundler }}
|
||||
cli: ${{ steps.filter.outputs.cli }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
tauri:
|
||||
- 'core/tauri/**'
|
||||
- '!core/tauri/scripts/**'
|
||||
build:
|
||||
- 'core/tauri-build/**'
|
||||
codegen:
|
||||
- 'core/tauri-codegen/**'
|
||||
macros:
|
||||
- 'core/tauri-macros/**'
|
||||
runtime:
|
||||
- 'core/tauri-runtime/**'
|
||||
wry:
|
||||
- 'core/tauri-runtime-wry/**'
|
||||
utils:
|
||||
- 'core/tauri-utils/**'
|
||||
bundler:
|
||||
- 'tooling/bundler/**'
|
||||
cli:
|
||||
- 'tooling/cli/**'
|
||||
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: |
|
||||
needs.changes.outputs.tauri == 'true' ||
|
||||
needs.changes.outputs.build == 'true' ||
|
||||
needs.changes.outputs.codegen == 'true' ||
|
||||
needs.changes.outputs.macros == 'true' ||
|
||||
needs.changes.outputs.runtime == 'true' ||
|
||||
needs.changes.outputs.wry == 'true' ||
|
||||
needs.changes.outputs.utils == 'true' ||
|
||||
needs.changes.outputs.bundler == 'true' ||
|
||||
needs.changes.outputs.cli == 'true'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -51,86 +80,86 @@ jobs:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: Get current date
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache cargo state
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_state
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-
|
||||
ubuntu-latest-nightly-
|
||||
ubuntu-latest-
|
||||
|
||||
- name: Cache core cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_core
|
||||
with:
|
||||
path: target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-
|
||||
ubuntu-latest-nightly-
|
||||
ubuntu-latest-
|
||||
|
||||
- name: Cache bundler cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_bundler
|
||||
with:
|
||||
path: tooling/bundler/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-
|
||||
ubuntu-latest-nightly-
|
||||
ubuntu-latest-
|
||||
|
||||
- name: Cache CLI cargo target
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cargo_cli
|
||||
with:
|
||||
path: tooling/cli/target
|
||||
# Add date to the cache to keep it up to date
|
||||
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
||||
# Restore from outdated cache for speed
|
||||
restore-keys: |
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
||||
ubuntu-latest-nightly-${{ env.cache-name }}-
|
||||
ubuntu-latest-nightly-
|
||||
ubuntu-latest-
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cargo-udeps --locked --force
|
||||
|
||||
- name: Upload udeps
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: udeps
|
||||
path: '~/.cargo/bin/cargo-udeps'
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create udeps matrix
|
||||
id: create-matrix
|
||||
env:
|
||||
TAURI: ${{ needs.changes.outputs.tauri == 'true' }}
|
||||
BUILD: ${{ needs.changes.outputs.build == 'true' }}
|
||||
CODEGEN: ${{ needs.changes.outputs.codegen == 'true' }}
|
||||
MACROS: ${{ needs.changes.outputs.macros == 'true' }}
|
||||
RUNTIME: ${{ needs.changes.outputs.runtime == 'true' }}
|
||||
WRY: ${{ needs.changes.outputs.wry == 'true' }}
|
||||
UTILS: ${{ needs.changes.outputs.utils == 'true' }}
|
||||
BUNDLER: ${{ needs.changes.outputs.bundler == 'true' }}
|
||||
CLI: ${{ needs.changes.outputs.cli == 'true' }}
|
||||
run: |
|
||||
crates=()
|
||||
if [ "${TAURI}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri\""; fi
|
||||
if [ "${BUILD}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-build\""; fi
|
||||
if [ "${CODEGEN}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-codegen\""; fi
|
||||
if [ "${MACROS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-macros\""; fi
|
||||
if [ "${RUNTIME}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime\""; fi
|
||||
if [ "${WRY}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime-wry\""; fi
|
||||
if [ "${UTILS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-utils\""; fi
|
||||
if [ "${BUNDLER}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/bundler\""; fi
|
||||
if [ "${CLI}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/cli\""; fi
|
||||
echo ::set-output name=matrix::[$crates]
|
||||
outputs:
|
||||
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
||||
|
||||
udeps:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
strategy:
|
||||
matrix:
|
||||
path: ${{ fromJson(needs.setup.outputs.matrix) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: |
|
||||
core -> ../target
|
||||
tooling/cli
|
||||
tooling/bundler
|
||||
|
||||
- name: Download udeps
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: udeps
|
||||
path: '~/.cargo/bin'
|
||||
|
||||
- run: chmod +x $HOME/.cargo/bin/cargo-udeps
|
||||
|
||||
- name: Install required packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: udeps
|
||||
args: --manifest-path ${{ matrix.clippy.path }} --all-targets ${{ matrix.clippy.args }}
|
||||
args: --manifest-path ${{ matrix.path }}/Cargo.toml --all-targets --all-features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
13
.prettierignore
Normal file
13
.prettierignore
Normal file
@@ -0,0 +1,13 @@
|
||||
/.github
|
||||
/.husky
|
||||
/.vscode
|
||||
/audits
|
||||
node_modules
|
||||
target
|
||||
dist
|
||||
/core/tauri/scripts
|
||||
/tooling/cli/templates
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
||||
/tooling/api/docs/js-api.json
|
||||
/core/config-schema/schema.json
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
semi: false,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env pwsh
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
9
.scripts/ci/has-diff.sh
Executable file
9
.scripts/ci/has-diff.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if git diff --quiet --ignore-submodules HEAD
|
||||
then
|
||||
echo "working directory is clean"
|
||||
else
|
||||
echo "found diff"
|
||||
exit 1
|
||||
fi
|
||||
18
.scripts/ci/pack-cli.sh
Executable file
18
.scripts/ci/pack-cli.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
for o in outputs/*; do
|
||||
pushd "$o"
|
||||
|
||||
chmod +x cargo-tauri*
|
||||
cp ../../tooling/cli/LICENSE* ../../tooling/cli/README.md .
|
||||
|
||||
target=$(basename "$o" | cut -d. -f1)
|
||||
if grep -qE '(apple|windows)' <<< "$target"; then
|
||||
zip "../${target}.zip" *
|
||||
else
|
||||
tar cv * | gzip -9 > "../${target}.tgz"
|
||||
fi
|
||||
|
||||
popd
|
||||
done
|
||||
54
.scripts/covector/package-latest-version.js
Normal file
54
.scripts/covector/package-latest-version.js
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/*
|
||||
This script is solely intended to be run as part of the `covector publish` step to
|
||||
check the latest version of a crate, considering the current minor version.
|
||||
*/
|
||||
|
||||
const https = require('https')
|
||||
|
||||
const kind = process.argv[2]
|
||||
const packageName = process.argv[3]
|
||||
const packageVersion = process.argv[4]
|
||||
const target = packageVersion.substring(0, packageVersion.lastIndexOf('.'))
|
||||
|
||||
let url = null
|
||||
switch (kind) {
|
||||
case 'cargo':
|
||||
url = `https://crates.io/api/v1/crates/${packageName}`
|
||||
break;
|
||||
case 'npm':
|
||||
url = `https://registry.npmjs.org/${packageName}`
|
||||
break;
|
||||
default:
|
||||
throw new Error('unexpected kind ' + kind)
|
||||
}
|
||||
|
||||
const options = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
'User-Agent': 'tauri (https://github.com/tauri-apps/tauri)'
|
||||
}
|
||||
}
|
||||
|
||||
https.get(url, options, (response) => {
|
||||
let chunks = []
|
||||
response.on('data', function (chunk) {
|
||||
chunks.push(chunk)
|
||||
})
|
||||
|
||||
response.on('end', function () {
|
||||
const data = JSON.parse(chunks.join(''))
|
||||
if (kind === 'cargo') {
|
||||
const versions = data.versions.filter(v => v.num.startsWith(target))
|
||||
console.log(versions.length ? versions[0].num : '0.0.0')
|
||||
} else if (kind === 'npm') {
|
||||
const versions = Object.keys(data.versions).filter(v => v.startsWith(target))
|
||||
console.log(versions[versions.length - 1] || '0.0.0')
|
||||
}
|
||||
})
|
||||
})
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user