maint/cicd ~ add GitHub Actions (GHA) workflow (build and deploy)

This commit is contained in:
Roy Ivy III 2019-11-20 12:21:23 -06:00 committed by Pierre Peltier
parent 9c3db9b838
commit a85dc11a47

65
.github/workflows/CD.yml vendored Normal file
View file

@ -0,0 +1,65 @@
name: CD
# spell-checker:ignore musl executables toolchain MSVC
on: [push, pull_request]
jobs:
build_linux:
name: Build (linux)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
# - i686-pc-windows-gnu
# - x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: Archive executables as artifacts
uses: actions/upload-artifact@master
with:
name: lsd-${{ matrix.target }}
path: target/${{ matrix.target }}/release/lsd
build_windows:
name: Build (windows)
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target:
# - i686-pc-windows-gnu
- i686-pc-windows-msvc
# - x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: Archive executables as artifacts
uses: actions/upload-artifact@master
with:
name: lsd-${{ matrix.target }}.exe
path: target/${{ matrix.target }}/release/lsd.exe