fix(cli): ci template upgrade
This commit is contained in:
parent
f6ac154378
commit
bd1d3fe0a6
3 changed files with 7 additions and 20 deletions
|
@ -1,13 +1,8 @@
|
||||||
export const createCargoConfig = (
|
export const createCargoConfig = (
|
||||||
enableLinuxArm7: boolean,
|
enableLinuxArm7: boolean,
|
||||||
enableLinuxArm8Gnu: boolean,
|
|
||||||
enableLinuxArm8Musl: boolean,
|
enableLinuxArm8Musl: boolean,
|
||||||
) => {
|
) => {
|
||||||
const result: string[] = []
|
const result: string[] = []
|
||||||
if (enableLinuxArm8Gnu) {
|
|
||||||
result.push(`[target.aarch64-unknown-linux-gnu]
|
|
||||||
linker = "aarch64-linux-gnu-gcc"`)
|
|
||||||
}
|
|
||||||
if (enableLinuxArm8Musl) {
|
if (enableLinuxArm8Musl) {
|
||||||
result.push(`[target.aarch64-unknown-linux-musl]
|
result.push(`[target.aarch64-unknown-linux-musl]
|
||||||
linker = "aarch64-linux-musl-gcc"
|
linker = "aarch64-linux-musl-gcc"
|
||||||
|
|
|
@ -75,7 +75,7 @@ jobs:
|
||||||
target: 'armv7-unknown-linux-gnueabihf'
|
target: 'armv7-unknown-linux-gnueabihf'
|
||||||
setup: |
|
setup: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
sudo apt-get install gcc-arm-linux-gnueabihf -y
|
||||||
build: |
|
build: |
|
||||||
yarn build --target=armv7-unknown-linux-gnueabihf
|
yarn build --target=armv7-unknown-linux-gnueabihf
|
||||||
arm-linux-gnueabihf-strip *.node
|
arm-linux-gnueabihf-strip *.node
|
||||||
|
@ -145,11 +145,10 @@ jobs:
|
||||||
target/
|
target/
|
||||||
key: \${{ matrix.settings.target }}-cargo-\${{ matrix.settings.host }}
|
key: \${{ matrix.settings.target }}-cargo-\${{ matrix.settings.host }}
|
||||||
|
|
||||||
- name: Cache NPM dependencies
|
- uses: goto-bus-stop/setup-zig@v2
|
||||||
uses: actions/cache@v3
|
if: \${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
version: 0.10.0
|
||||||
key: npm-cache-build-\${{ matrix.settings.target }}-node@16
|
|
||||||
|
|
||||||
- name: Setup toolchain
|
- name: Setup toolchain
|
||||||
run: \${{ matrix.settings.setup }}
|
run: \${{ matrix.settings.setup }}
|
||||||
|
@ -211,7 +210,7 @@ jobs:
|
||||||
usesh: true
|
usesh: true
|
||||||
mem: 3000
|
mem: 3000
|
||||||
prepare: |
|
prepare: |
|
||||||
pkg install -y curl node16 python2
|
pkg install -y -f curl node libnghttp2
|
||||||
curl -qL https://www.npmjs.com/install.sh | sh
|
curl -qL https://www.npmjs.com/install.sh | sh
|
||||||
npm install --location=global --ignore-scripts yarn
|
npm install --location=global --ignore-scripts yarn
|
||||||
curl https://sh.rustup.rs -sSf --output rustup.sh
|
curl https://sh.rustup.rs -sSf --output rustup.sh
|
||||||
|
|
|
@ -175,20 +175,13 @@ test('sum from native', (t) => {
|
||||||
join(process.cwd(), this.dirname!),
|
join(process.cwd(), this.dirname!),
|
||||||
)
|
)
|
||||||
|
|
||||||
const enableLinuxArm8Gnu = this.targets!.includes(
|
|
||||||
'aarch64-unknown-linux-gnu',
|
|
||||||
)
|
|
||||||
const enableLinuxArm8Musl = this.targets!.includes(
|
const enableLinuxArm8Musl = this.targets!.includes(
|
||||||
'aarch64-unknown-linux-musl',
|
'aarch64-unknown-linux-musl',
|
||||||
)
|
)
|
||||||
const enableLinuxArm7 = this.targets!.includes(
|
const enableLinuxArm7 = this.targets!.includes(
|
||||||
'armv7-unknown-linux-gnueabihf',
|
'armv7-unknown-linux-gnueabihf',
|
||||||
)
|
)
|
||||||
const cargoConfig = createCargoConfig(
|
const cargoConfig = createCargoConfig(enableLinuxArm7, enableLinuxArm8Musl)
|
||||||
enableLinuxArm7,
|
|
||||||
enableLinuxArm8Gnu,
|
|
||||||
enableLinuxArm8Musl,
|
|
||||||
)
|
|
||||||
if (cargoConfig.length) {
|
if (cargoConfig.length) {
|
||||||
const configDir = join(process.cwd(), this.dirname!, '.cargo')
|
const configDir = join(process.cwd(), this.dirname!, '.cargo')
|
||||||
if (!this.dryRun) {
|
if (!this.dryRun) {
|
||||||
|
|
Loading…
Reference in a new issue