diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2021-07-31 16:24:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 16:24:16 -0400 |
commit | cb680dd12eac795f85acf9733a4a0eeca3996f1d (patch) | |
tree | df59c66904779736b7df1aaa3b115957c9b739be /.github | |
parent | d1e672f26329a6483608ccd61a55f1e33f9662da (diff) |
other: Add RISC-V to unofficially supported targets (#565)
Adds CI actions and documentation for RISC-V.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 32 | ||||
-rw-r--r-- | .github/workflows/deployment.yml | 37 | ||||
-rw-r--r-- | .github/workflows/nightly.yml | 23 |
3 files changed, 71 insertions, 21 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46f28cda..69041fe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 189041c8..e29d1a9a 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4c13af32..817750ad 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 |