diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..f08bf66 --- /dev/null +++ b/.github/workflows/CD.yml @@ -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