Skip to content

Commit

Permalink
feat: Try to add loongarch support
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Nov 28, 2023
1 parent 935a7d9 commit d1178b6
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 82 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release-pkg.nu
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
$env.CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER = 'riscv64-linux-gnu-gcc'
cargo-build-nu $flags
}
'loongarch64-unknown-linux-gnu' => {
# https://github.com/rust-lang/cargo/pull/12436
# https://github.com/simd-everywhere/simde/blob/1594d7ccf9f0f05b98816731af1b39efbcbdb873/.github/workflows/ci.yml#L646
sudo apt-get install gcc-riscv64-linux-gnu -y
$env.CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNUN_LINKER = 'loongarch64-unknown-linux-gnu-gcc'
cargo-build-nu $flags
}
'armv7-unknown-linux-gnueabihf' => {
sudo apt-get install pkg-config gcc-arm-linux-gnueabihf -y
$env.CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER = 'arm-linux-gnueabihf-gcc'
Expand Down
172 changes: 90 additions & 82 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# REF:
# 1. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
#
name: Create Release Draft
name: Test Creating Release Draft

on:
push:
branches:
- release/testing
- release/loongarch64
tags:
- 'v*'

Expand All @@ -23,54 +23,58 @@ jobs:
fail-fast: false
matrix:
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- riscv64gc-unknown-linux-gnu
# - aarch64-apple-darwin
# - x86_64-apple-darwin
# - x86_64-pc-windows-msvc
# - aarch64-pc-windows-msvc
# - x86_64-unknown-linux-gnu
# - x86_64-unknown-linux-musl
# - aarch64-unknown-linux-gnu
# - armv7-unknown-linux-gnueabihf
# - riscv64gc-unknown-linux-gnu
- loongarch64-unknown-linux-gnu
extra: ['bin']
include:
- target: aarch64-apple-darwin
os: macos-latest
target_rustflags: ''
- target: x86_64-apple-darwin
os: macos-latest
target_rustflags: ''
- target: x86_64-pc-windows-msvc
extra: 'bin'
os: windows-latest
target_rustflags: ''
- target: x86_64-pc-windows-msvc
extra: msi
os: windows-latest
target_rustflags: ''
- target: aarch64-pc-windows-msvc
extra: 'bin'
os: windows-latest
target_rustflags: ''
- target: aarch64-pc-windows-msvc
extra: msi
os: windows-latest
target_rustflags: ''
- target: x86_64-unknown-linux-gnu
# - target: aarch64-apple-darwin
# os: macos-latest
# target_rustflags: ''
# - target: x86_64-apple-darwin
# os: macos-latest
# target_rustflags: ''
# - target: x86_64-pc-windows-msvc
# extra: 'bin'
# os: windows-latest
# target_rustflags: ''
# - target: x86_64-pc-windows-msvc
# extra: msi
# os: windows-latest
# target_rustflags: ''
# - target: aarch64-pc-windows-msvc
# extra: 'bin'
# os: windows-latest
# target_rustflags: ''
# - target: aarch64-pc-windows-msvc
# extra: msi
# os: windows-latest
# target_rustflags: ''
# - target: x86_64-unknown-linux-gnu
# os: ubuntu-20.04
# target_rustflags: ''
# - target: x86_64-unknown-linux-musl
# os: ubuntu-20.04
# target_rustflags: ''
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-20.04
# target_rustflags: ''
# - target: armv7-unknown-linux-gnueabihf
# os: ubuntu-20.04
# target_rustflags: ''
# - target: riscv64gc-unknown-linux-gnu
# os: ubuntu-20.04
# target_rustflags: ''
- target: loongarch64-unknown-linux-gnu
os: ubuntu-20.04
target_rustflags: ''
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
target_rustflags: ''
- target: aarch64-unknown-linux-gnu
os: ubuntu-20.04
target_rustflags: ''
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-20.04
target_rustflags: '--exclude=nu-cmd-dataframe'
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-20.04
target_rustflags: '--exclude=nu-cmd-dataframe'

runs-on: ${{matrix.os}}

Expand Down Expand Up @@ -119,44 +123,48 @@ jobs:
fail-fast: false
matrix:
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
# - aarch64-apple-darwin
# - x86_64-apple-darwin
# - x86_64-pc-windows-msvc
# - aarch64-pc-windows-msvc
# - x86_64-unknown-linux-gnu
# - x86_64-unknown-linux-musl
# - aarch64-unknown-linux-gnu
- loongarch64-unknown-linux-gnu
extra: ['bin']
include:
- target: aarch64-apple-darwin
os: macos-latest
target_rustflags: '--features=dataframe,extra'
- target: x86_64-apple-darwin
os: macos-latest
target_rustflags: '--features=dataframe,extra'
- target: x86_64-pc-windows-msvc
extra: 'bin'
os: windows-latest
target_rustflags: '--features=dataframe,extra'
- target: x86_64-pc-windows-msvc
extra: msi
os: windows-latest
target_rustflags: '--features=dataframe,extra'
- target: aarch64-pc-windows-msvc
extra: 'bin'
os: windows-latest
target_rustflags: '--features=dataframe,extra'
- target: aarch64-pc-windows-msvc
extra: msi
os: windows-latest
target_rustflags: '--features=dataframe,extra'
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
target_rustflags: '--features=dataframe,extra'
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
target_rustflags: '--features=dataframe,extra'
- target: aarch64-unknown-linux-gnu
# - target: aarch64-apple-darwin
# os: macos-latest
# target_rustflags: '--features=dataframe,extra'
# - target: x86_64-apple-darwin
# os: macos-latest
# target_rustflags: '--features=dataframe,extra'
# - target: x86_64-pc-windows-msvc
# extra: 'bin'
# os: windows-latest
# target_rustflags: '--features=dataframe,extra'
# - target: x86_64-pc-windows-msvc
# extra: msi
# os: windows-latest
# target_rustflags: '--features=dataframe,extra'
# - target: aarch64-pc-windows-msvc
# extra: 'bin'
# os: windows-latest
# target_rustflags: '--features=dataframe,extra'
# - target: aarch64-pc-windows-msvc
# extra: msi
# os: windows-latest
# target_rustflags: '--features=dataframe,extra'
# - target: x86_64-unknown-linux-gnu
# os: ubuntu-20.04
# target_rustflags: '--features=dataframe,extra'
# - target: x86_64-unknown-linux-musl
# os: ubuntu-20.04
# target_rustflags: '--features=dataframe,extra'
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-20.04
# target_rustflags: '--features=dataframe,extra'
- target: loongarch64-unknown-linux-gnu
os: ubuntu-20.04
target_rustflags: '--features=dataframe,extra'

Expand Down

0 comments on commit d1178b6

Please sign in to comment.