diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 5dcec7b..81f707b 100644 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -43,6 +43,10 @@ const profileDataItems: ProfileData[] = [{ os: OperatingSystem.Linux, cross: true, target: "riscv64gc-unknown-linux-gnu", +}, { + os: OperatingSystem.Linux, + cross: true, + target: "loongarch64-unknown-linux-gnu", }]; const profiles = profileDataItems.map((profile) => { return { @@ -133,7 +137,7 @@ const ci = { name: "Setup cross", if: "matrix.config.cross == 'true'", run: [ - "cargo install cross --git https://github.com/cross-rs/cross --rev 88f49ff79e777bef6d3564531636ee4d3cc2f8d2", + "cargo install cross --git https://github.com/cross-rs/cross --rev 4090beca3cfffa44371a5bba524de3a578aa46c3", ].join("\n"), }, { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ddfe13..6af7d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,10 @@ jobs: run_tests: 'false' target: riscv64gc-unknown-linux-gnu cross: 'true' + - os: ubuntu-20.04 + run_tests: 'false' + target: loongarch64-unknown-linux-gnu + cross: 'true' outputs: ZIP_CHECKSUM_X86_64_APPLE_DARWIN: '${{steps.pre_release_x86_64_apple_darwin.outputs.ZIP_CHECKSUM}}' ZIP_CHECKSUM_AARCH64_APPLE_DARWIN: '${{steps.pre_release_aarch64_apple_darwin.outputs.ZIP_CHECKSUM}}' @@ -61,6 +65,7 @@ jobs: ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_GNU: '${{steps.pre_release_aarch64_unknown_linux_gnu.outputs.ZIP_CHECKSUM}}' ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_MUSL: '${{steps.pre_release_aarch64_unknown_linux_musl.outputs.ZIP_CHECKSUM}}' ZIP_CHECKSUM_RISCV64GC_UNKNOWN_LINUX_GNU: '${{steps.pre_release_riscv64gc_unknown_linux_gnu.outputs.ZIP_CHECKSUM}}' + ZIP_CHECKSUM_LOONGARCH64_UNKNOWN_LINUX_GNU: '${{steps.pre_release_loongarch64_unknown_linux_gnu.outputs.ZIP_CHECKSUM}}' env: CARGO_INCREMENTAL: 0 RUST_BACKTRACE: full @@ -174,6 +179,13 @@ jobs: cd target/riscv64gc-unknown-linux-gnu/release zip -r dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip dprint-plugin-exec echo "::set-output name=ZIP_CHECKSUM::$(shasum -a 256 dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip | awk '{print $1}')" + - name: Pre-release (loongarch64-unknown-linux-gnu) + id: pre_release_loongarch64_unknown_linux_gnu + if: 'matrix.config.target == ''loongarch64-unknown-linux-gnu'' && startsWith(github.ref, ''refs/tags/'')' + run: |- + cd target/loongarch64-unknown-linux-gnu/release + zip -r dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip dprint-plugin-exec + echo "::set-output name=ZIP_CHECKSUM::$(shasum -a 256 dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip | awk '{print $1}')" - name: Upload artifacts (x86_64-apple-darwin) if: 'matrix.config.target == ''x86_64-apple-darwin'' && startsWith(github.ref, ''refs/tags/'')' uses: actions/upload-artifact@v4 @@ -222,6 +234,12 @@ jobs: with: name: riscv64gc-unknown-linux-gnu-artifacts path: target/riscv64gc-unknown-linux-gnu/release/dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip + - name: Upload artifacts (loongarch64-unknown-linux-gnu) + if: 'matrix.config.target == ''loongarch64-unknown-linux-gnu'' && startsWith(github.ref, ''refs/tags/'')' + uses: actions/upload-artifact@v4 + with: + name: loongarch64-unknown-linux-gnu-artifacts + path: target/loongarch64-unknown-linux-gnu/release/dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip draft_release: name: draft_release if: 'startsWith(github.ref, ''refs/tags/'')' @@ -243,6 +261,7 @@ jobs: mv aarch64-unknown-linux-gnu-artifacts/dprint-plugin-exec-aarch64-unknown-linux-gnu.zip . mv aarch64-unknown-linux-musl-artifacts/dprint-plugin-exec-aarch64-unknown-linux-musl.zip . mv riscv64gc-unknown-linux-gnu-artifacts/dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip . + mv loongarch64-unknown-linux-gnu-artifacts/dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip . - name: Output checksums run: |- echo "dprint-plugin-exec-x86_64-apple-darwin.zip: ${{needs.build.outputs.ZIP_CHECKSUM_X86_64_APPLE_DARWIN}}" @@ -253,6 +272,7 @@ jobs: echo "dprint-plugin-exec-aarch64-unknown-linux-gnu.zip: ${{needs.build.outputs.ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_GNU}}" echo "dprint-plugin-exec-aarch64-unknown-linux-musl.zip: ${{needs.build.outputs.ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_MUSL}}" echo "dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip: ${{needs.build.outputs.ZIP_CHECKSUM_RISCV64GC_UNKNOWN_LINUX_GNU}}" + echo "dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip: ${{needs.build.outputs.ZIP_CHECKSUM_LOONGARCH64_UNKNOWN_LINUX_GNU}}" - name: Create plugin file run: deno run --allow-read=. --allow-write=. scripts/create_plugin_file.ts - name: Get tag version @@ -277,6 +297,7 @@ jobs: dprint-plugin-exec-aarch64-unknown-linux-gnu.zip dprint-plugin-exec-aarch64-unknown-linux-musl.zip dprint-plugin-exec-riscv64gc-unknown-linux-gnu.zip + dprint-plugin-exec-loongarch64-unknown-linux-gnu.zip plugin.json deployment/schema.json body: |- diff --git a/scripts/create_plugin_file.ts b/scripts/create_plugin_file.ts index 3b02137..818735e 100644 --- a/scripts/create_plugin_file.ts +++ b/scripts/create_plugin_file.ts @@ -18,6 +18,7 @@ await processPlugin.createDprintOrgProcessPlugin({ "linux-x86_64", "linux-x86_64-musl", "linux-riscv64", + "linux-loongarch64", "windows-x86_64", ], isTest: Deno.args.some(a => a == "--test"),