diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 439765cdb05..de7edefe3c1 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -11,10 +11,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 with: - persist-credentials: false + profile: minimal + toolchain: stable + - name: Cache + uses: Swatinem/rust-cache@v1 - - name: Install and build + - name: Build docs run: cargo doc - name: Copy index to target/doc diff --git a/.github/workflows/upload-binaries.yml b/.github/workflows/upload-binaries.yml index 97829ffcb9e..79e45574993 100644 --- a/.github/workflows/upload-binaries.yml +++ b/.github/workflows/upload-binaries.yml @@ -21,11 +21,21 @@ jobs: armv7-unknown-linux-gnueabihf, ] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Cache + uses: Swatinem/rust-cache@v1 + - name: Node + uses: actions/setup-node@v2 with: node-version: "16" - - uses: google-github-actions/setup-gcloud@master + - name: GCloud + uses: google-github-actions/setup-gcloud@master with: project_id: ${{ secrets.GCP_PROJECT_ID }} service_account_key: ${{ secrets.GCP_SA_KEY }} @@ -46,7 +56,7 @@ jobs: rustup target add ${{ matrix.target }} # build and deploy CLI - cargo build -p tmc-langs-cli --release --verbose --target ${{ matrix.target }} + cargo build -p tmc-langs-cli --release --target ${{ matrix.target }} gsutil cp target/${{ matrix.target }}/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG # build and deploy Node module @@ -60,19 +70,30 @@ jobs: matrix: target: [i686-pc-windows-msvc, x86_64-pc-windows-msvc] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Cache + uses: Swatinem/rust-cache@v1 + - name: Node + uses: actions/setup-node@v2 with: node-version: "16" - - uses: google-github-actions/setup-gcloud@master + - name: GCloud + uses: google-github-actions/setup-gcloud@master with: project_id: ${{ secrets.GCP_PROJECT_ID }} service_account_key: ${{ secrets.GCP_SA_KEY }} + - name: Build run: | rustup target add ${{ matrix.target }} $env:RUSTFLAGS="-C target-feature=+crt-static" # crt-static is set with RUSTFLAGS to statically link MSVCRT (VCRUNTIME140.dll) - cargo build -p tmc-langs-cli --release --verbose --target ${{ matrix.target }} + cargo build -p tmc-langs-cli --release --target ${{ matrix.target }} cd ./bindings/tmc-langs-node && npm install && npm run build -- --release --target ${{ matrix.target }} - name: Deploy run: | @@ -84,17 +105,28 @@ jobs: macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Cache + uses: Swatinem/rust-cache@v1 + - name: Node + uses: actions/setup-node@v2 with: node-version: "16" - - uses: google-github-actions/setup-gcloud@master + - name: GCloud + uses: google-github-actions/setup-gcloud@master with: project_id: ${{ secrets.GCP_PROJECT_ID }} service_account_key: ${{ secrets.GCP_SA_KEY }} + - name: Cargo build run: | - cargo build -p tmc-langs-cli --release --verbose + cargo build -p tmc-langs-cli --release npm --prefix ./bindings/tmc-langs-node install npm run --prefix ./bindings/tmc-langs-node build -- --release - name: Sign diff --git a/Cargo.lock b/Cargo.lock index b05617aa570..6e4dc6d80f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] @@ -38,9 +38,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" [[package]] name = "assert-json-diff" @@ -230,9 +230,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.7.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" +checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" [[package]] name = "byteorder" @@ -616,9 +616,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ "cfg-if 1.0.0", "crc32fast", @@ -797,9 +797,9 @@ checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" [[package]] name = "h2" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" +checksum = "6c06815895acec637cd6ed6e9662c935b866d20a106f8361892893a7d9234964" dependencies = [ "bytes", "fnv", @@ -856,9 +856,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" dependencies = [ "bytes", "fnv", @@ -896,9 +896,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.12" +version = "0.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" +checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" dependencies = [ "bytes", "futures-channel", @@ -972,9 +972,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +checksum = "716d3d89f35ac6a34fd0eed635395f4c3b76fa889338a4632e5231a8684216bd" dependencies = [ "cfg-if 1.0.0", ] @@ -1091,9 +1091,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.101" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" [[package]] name = "libloading" @@ -1134,9 +1134,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memoffset" @@ -1268,9 +1268,9 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7555d6c7164cc913be1ce7f95cbecdabda61eb2ccd89008524af306fb7f5031" +checksum = "d3bb9a13fa32bc5aeb64150cd3f32d6cf4c748f8f8a417cce5d2eb976a8370ba" dependencies = [ "bitflags", "cc", @@ -1464,9 +1464,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" [[package]] name = "pmutil" @@ -1800,9 +1800,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.6" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", @@ -1922,9 +1922,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "d7a48d098c2a7fdf5740b19deb1181b4fb8a9e68e03ae517c14cde04b5725409" dependencies = [ "chrono", "dyn-clone", @@ -1935,9 +1935,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "4a9ea2a613fe4cd7118b2bb101a25d8ae6192e1975179b67b2f17afd11e70ac8" dependencies = [ "proc-macro2", "quote", @@ -1987,9 +1987,9 @@ dependencies = [ [[package]] name = "serde-xml-rs" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3adb528249756f81ba25e0359e7d7462d0a27a47e8843c4c7c44b5aaf146d4ee" +checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa" dependencies = [ "log", "serde", @@ -2021,9 +2021,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ "itoa", "ryu", @@ -2032,9 +2032,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f6109f0506e20f7e0f910e51a0079acf41da8e0694e6442527c4ddf5a2b158" +checksum = "d0421d4f173fab82d72d6babf36d57fae38b994ca5c2d78e704260ba6d12118b" dependencies = [ "serde", ] @@ -2053,9 +2053,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad104641f3c958dab30eb3010e834c2622d1f3f4c530fef1dee20ad9485f3c09" +checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" dependencies = [ "dtoa", "indexmap", @@ -2065,9 +2065,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9204c41a1597a8c5af23c82d1c921cb01ec0a4c59e07a9c7306062829a3903f3" +checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" dependencies = [ "block-buffer", "cfg-if 1.0.0", @@ -2138,9 +2138,9 @@ checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" [[package]] name = "smallvec" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "smol" @@ -2162,9 +2162,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", "winapi", @@ -2258,9 +2258,9 @@ dependencies = [ [[package]] name = "subprocess" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "334b801f9ca2529ba9605109f1d2835f15aff94cd6cfe5afe6ce8cf71e5fd3c4" +checksum = "055cf3ebc2981ad8f0a5a17ef6652f652d87831f79fddcba2ac57bcb9a0aa407" dependencies = [ "libc", "winapi", @@ -2496,9 +2496,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" dependencies = [ "tinyvec_macros", ] @@ -2801,9 +2801,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" +checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" dependencies = [ "autocfg 1.0.1", "bytes", @@ -2857,9 +2857,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "84f96e095c0c82419687c20ddf5cb3eadb61f4e1405923c9dc8e53a1adacbda8" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", @@ -2868,9 +2868,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +checksum = "46125608c26121c81b0c6d693eab5a420e416da7e43c426d2e8f7df8da8a3acf" dependencies = [ "lazy_static", ] @@ -2883,8 +2883,8 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "ts-rs" -version = "3.0.0" -source = "git+https://github.com/Heliozoa/ts-rs/?branch=ext#82b8ecfb44c876a0e82007c7bcfe9fe4a0268cab" +version = "4.0.0" +source = "git+https://github.com/Heliozoa/ts-rs/?rev=83650073943c33ccab7c80db3e9d748941773333#83650073943c33ccab7c80db3e9d748941773333" dependencies = [ "dprint-plugin-typescript", "ts-rs-macros", @@ -2892,14 +2892,13 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "3.0.0" -source = "git+https://github.com/Heliozoa/ts-rs/?branch=ext#82b8ecfb44c876a0e82007c7bcfe9fe4a0268cab" +version = "4.0.0" +source = "git+https://github.com/Heliozoa/ts-rs/?rev=83650073943c33ccab7c80db3e9d748941773333#83650073943c33ccab7c80db3e9d748941773333" dependencies = [ "Inflector", "proc-macro2", "quote", "syn", - "termcolor", ] [[package]] @@ -2949,9 +2948,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" diff --git a/bindings/tmc-langs-node/Cargo.toml b/bindings/tmc-langs-node/Cargo.toml index 74d4e401edd..c82732508f4 100644 --- a/bindings/tmc-langs-node/Cargo.toml +++ b/bindings/tmc-langs-node/Cargo.toml @@ -22,7 +22,7 @@ env_logger = "0.9" serde = "1" serde_json = "1" thiserror = "1" -ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", branch = "ext" } +ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", rev = "83650073943c33ccab7c80db3e9d748941773333" } [dev-dependencies] log = "0.4" diff --git a/tmc-client/Cargo.toml b/tmc-client/Cargo.toml index 4bdf0723127..5eb6e5e3394 100644 --- a/tmc-client/Cargo.toml +++ b/tmc-client/Cargo.toml @@ -23,7 +23,7 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" tempfile = "3" thiserror = "1" -ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", branch = "ext", optional = true } +ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", rev = "83650073943c33ccab7c80db3e9d748941773333", optional = true } url = "2" walkdir = "2" diff --git a/tmc-langs-framework/Cargo.toml b/tmc-langs-framework/Cargo.toml index 9e2c103c06d..94a0b2b6b89 100644 --- a/tmc-langs-framework/Cargo.toml +++ b/tmc-langs-framework/Cargo.toml @@ -19,7 +19,7 @@ serde_yaml = "0.8" schemars = "0.8" subprocess = "0.2" tempfile = "3" -ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", branch = "ext", optional = true } +ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", rev = "83650073943c33ccab7c80db3e9d748941773333", optional = true } thiserror = "1" walkdir = "2" zip = "0.5" diff --git a/tmc-langs/Cargo.toml b/tmc-langs/Cargo.toml index 55525fff117..fe3e6c3bce4 100644 --- a/tmc-langs/Cargo.toml +++ b/tmc-langs/Cargo.toml @@ -34,7 +34,7 @@ tar = "0.4" tempfile = "3" thiserror = "1" toml = "0.5" -ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", branch = "ext", optional = true } +ts-rs = { git = "https://github.com/Heliozoa/ts-rs/", rev = "83650073943c33ccab7c80db3e9d748941773333", optional = true } url = "2" walkdir = "2" zip = "0.5"