mirror of
https://github.com/lsd-rs/lsd.git
synced 2026-02-12 02:05:40 +02:00
🛤️ ✨: add loongarch ci and releases (#990)
Signed-off-by: Wei Zhang <kweizh@gmail.com>
This commit is contained in:
44
.github/workflows/CICD.yml
vendored
44
.github/workflows/CICD.yml
vendored
@@ -279,6 +279,50 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
container_build:
|
||||
name: Container Build
|
||||
runs-on: ${{ matrix.job.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job:
|
||||
- { os: ubuntu-latest, target: loongarch64-unknown-linux-gnu, platform: loong64 }
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
image: tonistiigi/binfmt:master
|
||||
- name: Containerized Build
|
||||
# containerized build is slow, but easy to setup and cross compile
|
||||
# currently only used for:
|
||||
# - loongarch64
|
||||
#
|
||||
# tests should be done previously
|
||||
shell: bash
|
||||
run: |
|
||||
docker run --platform linux/${{ matrix.job.platform }} \
|
||||
-v `pwd`:/src \
|
||||
kweizh/loongarch-rust:v0.1.0 \
|
||||
build --release --target ${{ matrix.job.target }}
|
||||
|
||||
# determine EXE suffix
|
||||
EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac;
|
||||
echo "EXE_suffix=${EXE_suffix}" >> $GITHUB_OUTPUT
|
||||
- name: Archive executable artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}
|
||||
path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
coverage:
|
||||
name: Code Coverage
|
||||
runs-on: ${{ matrix.job.os }}
|
||||
|
||||
@@ -16,7 +16,7 @@ pub enum FileType {
|
||||
|
||||
impl FileType {
|
||||
#[cfg(windows)]
|
||||
const EXECUTABLE_EXTENSIONS: &[&'static str] = &["exe", "msi", "bat", "ps1"];
|
||||
const EXECUTABLE_EXTENSIONS: &'static [&'static str] = &["exe", "msi", "bat", "ps1"];
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn new(
|
||||
|
||||
Reference in New Issue
Block a user