From 828afa76f0ae89df7b84b7393afcda0d9ddb3db3 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 18:05:33 +0800 Subject: [PATCH 1/6] fix: target to use for cross building --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fc708af4..df5399312 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,35 +41,39 @@ jobs: platform: win32 arch: x64 regular_build: 'true' + cross: false - os: windows-latest rust-target: aarch64-pc-windows-msvc platform: win32 arch: arm64 + cross: false - os: ubuntu-20.04 - rust-target: x86_64-unknown-linux-gnu + rust-target: x86_64-unknown-linux-musl platform: linux arch: x64 regular_build: 'true' cross: true - os: ubuntu-20.04 - rust-target: aarch64-unknown-linux-gnu + rust-target: aarch64-unknown-linux-musl platform: linux arch: arm64 cross: true - os: ubuntu-20.04 - rust-target: arm-unknown-linux-gnueabihf + rust-target: armv7-unknown-linux-musleabi platform: linux - arch: armhf + arch: armv7 cross: true - os: macos-13 rust-target: x86_64-apple-darwin platform: darwin arch: x64 + cross: false - os: macos-13 rust-target: aarch64-apple-darwin platform: darwin arch: arm64 regular_build: 'true' + cross: false name: build (${{ matrix.platform }}-${{ matrix.arch }}) runs-on: ${{ matrix.os }} env: From 652b1df408b6ddae55385ad25f16feb7e9c1e33e Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 18:07:02 +0800 Subject: [PATCH 2/6] build: bump version to 0.12.4-rc3 --- Cargo.lock | 34 +++++++++++++++++----------------- Cargo.toml | 4 ++-- editors/vscode/package.json | 2 +- syntaxes/textmate/package.json | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1cbfed29f..4abfc8412 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3780,7 +3780,7 @@ dependencies = [ [[package]] name = "sync-lsp" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "anyhow", "clap", @@ -3902,7 +3902,7 @@ dependencies = [ [[package]] name = "tests" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "insta", "lsp-server", @@ -4025,7 +4025,7 @@ dependencies = [ [[package]] name = "tinymist" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "anyhow", "async-trait", @@ -4066,7 +4066,7 @@ dependencies = [ "serde_yaml", "strum", "sync-lsp", - "tinymist-assets 0.12.4-rc2 (registry+https://github.com/rust-lang/crates.io-index)", + "tinymist-assets 0.12.4-rc3 (registry+https://github.com/rust-lang/crates.io-index)", "tinymist-query", "tinymist-render", "tinymist-world", @@ -4093,7 +4093,7 @@ dependencies = [ [[package]] name = "tinymist-analysis" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "base64", "comemo 0.4.0", @@ -4110,17 +4110,17 @@ dependencies = [ [[package]] name = "tinymist-assets" -version = "0.12.4-rc2" +version = "0.12.4-rc3" [[package]] name = "tinymist-assets" -version = "0.12.4-rc2" +version = "0.12.4-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f15b9924413b373fadf822c5a1c9dab36e5083a3e71471fb24a895bd1a2522" +checksum = "3b22a7eddabeb6a407eb0cfef448f8fa84dde19284bbd14b7ee727337557218f" [[package]] name = "tinymist-derive" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "quote", "syn 2.0.87", @@ -4128,7 +4128,7 @@ dependencies = [ [[package]] name = "tinymist-query" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "anyhow", "base64", @@ -4182,7 +4182,7 @@ dependencies = [ [[package]] name = "tinymist-render" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "base64", "log", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "tinymist-world" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "anyhow", "chrono", @@ -4206,7 +4206,7 @@ dependencies = [ "reflexo-typst-shim", "serde", "serde_json", - "tinymist-assets 0.12.4-rc2 (registry+https://github.com/rust-lang/crates.io-index)", + "tinymist-assets 0.12.4-rc3 (registry+https://github.com/rust-lang/crates.io-index)", "typst", "typst-assets", "typst-kit", @@ -4491,7 +4491,7 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typlite" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "base64", "comemo 0.4.0", @@ -4665,7 +4665,7 @@ dependencies = [ [[package]] name = "typst-preview" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "clap", "comemo 0.4.0", @@ -4678,7 +4678,7 @@ dependencies = [ "reflexo-vec2svg", "serde", "serde_json", - "tinymist-assets 0.12.4-rc2 (registry+https://github.com/rust-lang/crates.io-index)", + "tinymist-assets 0.12.4-rc3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio", "typst", "typst-assets", @@ -4705,7 +4705,7 @@ dependencies = [ [[package]] name = "typst-shim" -version = "0.12.4-rc2" +version = "0.12.4-rc3" dependencies = [ "cfg-if", "typst", diff --git a/Cargo.toml b/Cargo.toml index f4d6f558d..4da2bb52d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace.package] description = "An integrated language service for Typst." authors = ["Myriad-Dreamin ", "Nathan Varner"] -version = "0.12.4-rc2" +version = "0.12.4-rc3" edition = "2021" readme = "README.md" license = "Apache-2.0" @@ -145,7 +145,7 @@ insta = { version = "1.39", features = ["glob"] } # Our Own Crates typst-preview = { path = "./crates/typst-preview" } -tinymist-assets = { version = "0.12.4-rc2" } +tinymist-assets = { version = "0.12.4-rc3" } tinymist = { path = "./crates/tinymist/" } tinymist-derive = { path = "./crates/tinymist-derive/" } tinymist-analysis = { path = "./crates/tinymist-analysis/" } diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 9a465f72c..d1c412be7 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -1,6 +1,6 @@ { "name": "tinymist", - "version": "0.12.4-rc2", + "version": "0.12.4-rc3", "description": "An integrated language service for Typst", "keywords": [ "typst", diff --git a/syntaxes/textmate/package.json b/syntaxes/textmate/package.json index 83323075e..f2e46c583 100644 --- a/syntaxes/textmate/package.json +++ b/syntaxes/textmate/package.json @@ -1,6 +1,6 @@ { "name": "typst-textmate", - "version": "0.12.4-rc2", + "version": "0.12.4-rc3", "private": true, "scripts": { "compile": "npx tsc && node ./dist/main.mjs", From 99b002789296e71440919ae8ccbd5d3860dcea1d Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 18:08:18 +0800 Subject: [PATCH 3/6] dev: install llvm --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df5399312..95618ae79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,6 +116,11 @@ jobs: with: targets: ${{ matrix.rust-target }} if: (fromJson(env.isRelease) || fromJson(env.isNightly)) + - name: Install llvm + if: matrix.platform == 'linux' && (fromJson(env.isRelease) || fromJson(env.isNightly)) + run: | + sudo apt-get update + sudo apt-get install llvm - name: Run rust-cache uses: Swatinem/rust-cache@v2 if: (fromJson(env.isRelease) || fromJson(env.isNightly)) From bb7b7f0d84058c51fa80b34a0a3bf000adca858d Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 18:48:59 +0800 Subject: [PATCH 4/6] dev: install musl-dev --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95618ae79..0026b8e89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,11 +116,11 @@ jobs: with: targets: ${{ matrix.rust-target }} if: (fromJson(env.isRelease) || fromJson(env.isNightly)) - - name: Install llvm + - name: Install llvm and musl if: matrix.platform == 'linux' && (fromJson(env.isRelease) || fromJson(env.isNightly)) run: | sudo apt-get update - sudo apt-get install llvm + sudo apt-get install llvm musl-dev - name: Run rust-cache uses: Swatinem/rust-cache@v2 if: (fromJson(env.isRelease) || fromJson(env.isNightly)) From 7d9ba63f13881c10de5cb4ce1f0cba88cc9b3bf1 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 23:21:37 +0800 Subject: [PATCH 5/6] dev: use cross --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0026b8e89..01aa0ac5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -158,10 +158,14 @@ jobs: cp "target/${{ matrix.rust-target }}/gh-release/tinymist$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" "editors/vscode/out/" cp "target/${{ matrix.rust-target }}/gh-release/tinymist$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" "contrib/typst-preview/editors/vscode/out/" cp "target/${{ matrix.rust-target }}/gh-release/tinymist$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" "tinymist-${{ env.target }}$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" + - name: Test tinymist + run: | + cross test --profile=gh-release --workspace --target ${{ matrix.rust-target }} + if: matrix.cross && (fromJson(env.isRelease) || fromJson(env.isNightly)) && (matrix.platform == 'linux') && (matrix.arch == 'x64') - name: Test tinymist run: | cargo test --profile=gh-release --workspace --target ${{ matrix.rust-target }} - if: (fromJson(env.isRelease) || fromJson(env.isNightly)) && (matrix.platform == 'linux') && (matrix.arch == 'x64') + if: "!matrix.cross && (fromJson(env.isRelease) || fromJson(env.isNightly)) && (matrix.platform == 'linux') && (matrix.arch == 'x64')" - name: Upload split debug symbols for windows if: matrix.platform == 'win32' && (fromJson(env.isRelease) || fromJson(env.isNightly)) uses: actions/upload-artifact@v4 From 15c7fef54a072ebbfade698b6f2a2e41c6336897 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Fri, 22 Nov 2024 23:41:47 +0800 Subject: [PATCH 6/6] dev: vendor ssl --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01aa0ac5d..71061bf79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,7 +160,7 @@ jobs: cp "target/${{ matrix.rust-target }}/gh-release/tinymist$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" "tinymist-${{ env.target }}$(If ('${{ matrix.platform }}' -eq 'win32') { '.exe' } else { '' } )" - name: Test tinymist run: | - cross test --profile=gh-release --workspace --target ${{ matrix.rust-target }} + cross test --profile=gh-release --workspace --target ${{ matrix.rust-target }} --features vendor-openssl if: matrix.cross && (fromJson(env.isRelease) || fromJson(env.isNightly)) && (matrix.platform == 'linux') && (matrix.arch == 'x64') - name: Test tinymist run: |