Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add loongarch64-unknown-linux-gnu build #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"),
},
{
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/'')'
Expand All @@ -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}}"
Expand All @@ -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
Expand All @@ -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: |-
Expand Down
1 change: 1 addition & 0 deletions scripts/create_plugin_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down