other: Add RISC-V to unofficially supported targets (#565)

Adds CI actions and documentation for RISC-V.
This commit is contained in:
Clement Tsang
2021-07-31 16:24:16 -04:00
committed by GitHub
parent d1e672f263
commit cb680dd12e
17 changed files with 106 additions and 54 deletions
+19 -13
View File
@@ -10,21 +10,20 @@ on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'README.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- "README.md"
- "docs/**"
- ".github/ISSUE_TEMPLATE/**"
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- "README.md"
- "docs/**"
- ".github/ISSUE_TEMPLATE/**"
- "CHANGELOG.md"
- "CONTRIBUTING.md"
jobs:
# Check rustfmt
rustfmt:
runs-on: ${{ matrix.os }}
strategy:
@@ -44,10 +43,9 @@ jobs:
components: rustfmt
- uses: Swatinem/rust-cache@v1
- run: cargo fmt --all -- --check
# Check clippy. Note that this doesn't check ARM.
clippy:
runs-on: ${{ matrix.os }}
strategy:
@@ -69,8 +67,6 @@ jobs:
- uses: Swatinem/rust-cache@v1
# TODO: Can probably put cache here in the future; I'm worried if this will cause issues with clippy though since cargo check breaks it; maybe wait until 1.52, when fix lands.
- run: cargo clippy --all-targets --workspace -- -D warnings
# Compile/check/test.
@@ -174,6 +170,14 @@ jobs:
rust: stable,
}
# Risc-V 64gc
- {
os: "ubuntu-latest",
target: "riscv64gc-unknown-linux-gnu",
cross: true,
rust: stable,
}
# macOS ARM
- {
os: "macOS-latest",
@@ -194,6 +198,8 @@ jobs:
target: ${{ matrix.triple.target }}
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.triple.target }}
- name: Check
uses: actions-rs/cargo@v1
+31 -6
View File
@@ -75,6 +75,7 @@ jobs:
target: "x86_64-unknown-linux-gnu",
cross: false,
artifact: true,
strip: true,
}
- {
os: "ubuntu-18.04",
@@ -82,31 +83,46 @@ jobs:
cross: false,
container: quay.io/pypa/manylinux2014_x86_64,
suffix: "2-17",
strip: true,
}
- {
os: "ubuntu-18.04",
target: "i686-unknown-linux-gnu",
cross: true,
strip: true,
}
- {
os: "ubuntu-18.04",
target: "x86_64-unknown-linux-musl",
cross: false,
artifact: true
artifact: true,
strip: true,
}
- {
os: "ubuntu-18.04",
target: "i686-unknown-linux-musl",
cross: true,
strip: true,
}
- {
os: "macOS-latest",
target: "x86_64-apple-darwin",
cross: false,
artifact: true,
strip: true,
}
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false, artifact: true }
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
cross: false,
artifact: true,
}
- { os: "windows-2019", target: "i686-pc-windows-msvc", cross: false, artifact: true }
- {
os: "windows-2019",
target: "i686-pc-windows-msvc",
cross: false,
artifact: true,
}
- {
os: "windows-2019",
target: "x86_64-pc-windows-gnu",
@@ -118,7 +134,7 @@ jobs:
os: "ubuntu-18.04",
target: "aarch64-unknown-linux-gnu",
cross: true,
artifact: true
artifact: true,
}
# armv7
@@ -126,7 +142,7 @@ jobs:
os: "ubuntu-18.04",
target: "armv7-unknown-linux-gnueabihf",
cross: true,
artifact: true
artifact: true,
}
# PowerPC 64 LE
@@ -136,6 +152,13 @@ jobs:
cross: true,
}
# Risc-V 64gc
- {
os: "ubuntu-18.04",
target: "riscv64gc-unknown-linux-gnu",
cross: true,
}
steps:
- name: Checkout repository
uses: actions/checkout@v2
@@ -188,6 +211,8 @@ jobs:
target: ${{ matrix.triple.target }}
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.triple.target }}
- name: Build
uses: actions-rs/cargo@v1
@@ -202,7 +227,7 @@ jobs:
cp -r ./target/${{ matrix.triple.target }}/release/build/bottom-*/out completion
- name: Strip release binary (macOS or Linux x86-64/i686)
if: matrix.triple.os != 'windows-2019' && matrix.triple.target != 'aarch64-unknown-linux-gnu' && matrix.triple.target != 'armv7-unknown-linux-gnueabihf' && matrix.triple.target != 'powerpc64le-unknown-linux-gnu'
if: matrix.triple.strip == true
run: |
strip target/${{ matrix.triple.target }}/release/btm
+21 -2
View File
@@ -84,6 +84,7 @@ jobs:
os: "ubuntu-18.04",
target: "x86_64-unknown-linux-gnu",
cross: false,
strip: true,
}
- {
os: "ubuntu-18.04",
@@ -91,23 +92,32 @@ jobs:
cross: false,
container: quay.io/pypa/manylinux2014_x86_64,
suffix: "2-17",
strip: true,
}
- {
os: "ubuntu-18.04",
target: "i686-unknown-linux-gnu",
cross: true,
strip: true,
}
- {
os: "ubuntu-18.04",
target: "x86_64-unknown-linux-musl",
cross: false,
strip: true,
}
- {
os: "ubuntu-18.04",
target: "i686-unknown-linux-musl",
cross: true,
strip: true,
}
- {
os: "macOS-latest",
target: "x86_64-apple-darwin",
cross: false,
strip: true,
}
- { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false }
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
@@ -141,6 +151,13 @@ jobs:
cross: true,
}
# Risc-V 64gc
- {
os: "ubuntu-18.04",
target: "riscv64gc-unknown-linux-gnu",
cross: true,
}
steps:
- name: Checkout repository
uses: actions/checkout@v2
@@ -188,6 +205,8 @@ jobs:
target: ${{ matrix.triple.target }}
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.triple.target }}
- name: Build
uses: actions-rs/cargo@v1
@@ -202,7 +221,7 @@ jobs:
cp -r ./target/${{ matrix.triple.target }}/release/build/bottom-*/out completion
- name: Strip release binary (macOS or Linux x86-64/i686)
if: matrix.triple.os != 'windows-2019' && matrix.triple.target != 'aarch64-unknown-linux-gnu' && matrix.triple.target != 'armv7-unknown-linux-gnueabihf' && matrix.triple.target != 'powerpc64le-unknown-linux-gnu'
if: matrix.triple.strip == true
run: |
strip target/${{ matrix.triple.target }}/release/btm