Skip to content

Commit 64d7150

Browse files
authored
feat(loongarch): 完善龙架构支持 (#2)
* fix(devcontainer.json)L fix the link of prettier * fix(devcontainer.json): build error of prettier See https://github.com/devcontainers-community/npm-features/pull/2/files * feat: Add LoongArch ABI1.0 support in CI and engine * refactor(engines): Update LoongArch64 engine and remove ABI1.0 support * refactor(workflows): remove redundant 'v1' branch triggers * Switch from pnpm to npm in workflows and remove pnpm-lock.yaml * fix(ci): Correct loongarch target pattern in ci.yml * ci: add v1 branch to workflow triggers * refactor(engine): remove console logs and update eslint config
1 parent 216618c commit 64d7150

File tree

16 files changed

+923
-10615
lines changed

16 files changed

+923
-10615
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
},
3737
"features": {
3838
"ghcr.io/devcontainers/features/github-cli:1": {},
39-
"ghcr.io/devcontainers-contrib/features/prettier:1": {}
39+
"ghcr.io/devcontainers-community/npm-features/prettier:1": {}
4040
}
4141
}

.github/workflows/check-dist.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,13 @@ jobs:
3636
with:
3737
node-version-file: .node-version
3838

39-
- uses: pnpm/action-setup@v3
40-
name: Install pnpm
41-
with:
42-
version: 8
43-
run_install: false
44-
4539
- name: Install Dependencies
4640
id: install
47-
run: pnpm i
41+
run: npm install
4842

4943
- name: Build dist/ Directory
5044
id: build
51-
run: pnpm run bundle
45+
run: npm run bundle
5246

5347
# This will fail the workflow if the `dist/` directory is different than
5448
# expected.

.github/workflows/ci.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- v1
10-
1110
permissions:
1211
contents: read
1312

@@ -27,34 +26,30 @@ jobs:
2726
with:
2827
node-version-file: .node-version
2928

30-
- uses: pnpm/action-setup@v3
31-
name: Install pnpm
32-
with:
33-
version: 8
34-
run_install: false
35-
3629
- name: Install Dependencies
3730
id: npm-ci
38-
run: pnpm i
31+
run: npm install
3932

4033
- name: Check Format
4134
id: npm-format-check
42-
run: pnpm run format:check
35+
run: npm run format:check
4336

4437
- name: Lint
4538
id: npm-lint
46-
run: pnpm run lint
39+
run: npm run lint
4740

4841
- name: Test
4942
id: npm-ci-test
50-
run: pnpm run ci-test
43+
run: npm run ci-test
5144

5245
test-action:
5346
strategy:
5447
matrix:
5548
include:
56-
- target: '!(*musl*|*windows-arm64*|*android*|*freebsd*|*windows7*)' # xgo
57-
name: 'xgo'
49+
- target: '!(*musl*|*windows-arm64*|*android*|*freebsd*|*windows7*|linux-loong64-abi1.0|linux-loong64)' # xgo
50+
name: 'glibc'
51+
- target: '(linux-loong64-abi1.0|linux-loong64)' #glibc
52+
name: 'loongarch'
5853
- target: 'linux-*-musl*' #musl
5954
name: 'musl'
6055
- target: 'windows-arm64' #win-arm64

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# CGO Actions
22

3-
[![GitHub Super-Linter](https://github.com/OpenListTeam/cgo-actions/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
4-
![CI](https://github.com/OpenListTeam/cgo-actions/actions/workflows/test-actions.yml/badge.svg)
3+
![CI](https://github.com/OpenListTeam/cgo-actions/actions/workflows/ci.yml/badge.svg)
54
[![Check dist/](https://github.com/OpenListTeam/cgo-actions/actions/workflows/check-dist.yml/badge.svg)](https://github.com/OpenListTeam/cgo-actions/actions/workflows/check-dist.yml)
65
[![CodeQL](https://github.com/OpenListTeam/cgo-actions/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/OpenListTeam/cgo-actions/actions/workflows/codeql-analysis.yml)
76

@@ -82,7 +81,11 @@ jobs:
8281

8382
### Supported Targets
8483

85-
Use glob patterns to match the targets you want to build for.
84+
1. Use glob patterns to match the targets you want to build for.
85+
2. LoongArch64 have 3 different targets, `linux-loong64`, `linux-loong64-abi1.0`
86+
and `linux-loong64-musl`. Both `linux-loong64` and `linux-loong64-musl`
87+
targets for `ABI2.0` (a.k.a new world) and `linux-loong64-abi1.0` targets for
88+
`ABI1.0` (a.k.a old world).
8689

8790
- darwin-amd64
8891
- darwin-arm64
@@ -98,6 +101,8 @@ Use glob patterns to match the targets you want to build for.
98101
- linux-mips64le
99102
- linux-ppc64le
100103
- linux-riscv64
104+
- linux-loong64
105+
- linux-loong64-abi1.0
101106
- linux-s390x
102107
- windows-386
103108
- windows-amd64

0 commit comments

Comments
 (0)