mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
97 lines
3.6 KiB
YAML
97 lines
3.6 KiB
YAML
name: CI
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: macOS-latest
|
|
target: x86_64-apple-darwin
|
|
rust_flags: ''
|
|
features: ''
|
|
target_binary: 'target/x86_64-apple-darwin/release/taskwarrior-tui'
|
|
binary: 'taskwarrior-tui-x86_64-apple-darwin'
|
|
upx_args: --best
|
|
strip: true
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
rust_flags: ''
|
|
features: ''
|
|
target_binary: 'target/x86_64-unknown-linux-gnu/release/taskwarrior-tui'
|
|
binary: 'taskwarrior-tui-x86_64-unknown-linux-gnu'
|
|
upx_args: --best --lzma
|
|
strip: true
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-musl
|
|
rust_flags: ''
|
|
features: ''
|
|
target_binary: 'target/x86_64-unknown-linux-musl/release/taskwarrior-tui'
|
|
binary: 'taskwarrior-tui-x86_64-unknown-linux-musl'
|
|
upx_args: --best --lzma
|
|
strip: true
|
|
- os: ubuntu-latest
|
|
target: i686-unknown-linux-musl
|
|
rust_flags: ''
|
|
features: ''
|
|
target_binary: 'target/i686-unknown-linux-musl/release/taskwarrior-tui'
|
|
binary: 'taskwarrior-tui-i686-unknown-linux-musl'
|
|
upx_args: --best --lzma
|
|
strip: true
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-gnu
|
|
rust_flags: -C target-feature=+crt-static
|
|
features: '--no-default-features --features=crossterm-backend'
|
|
target_binary: 'target\x86_64-pc-windows-gnu\release\taskwarrior-tui.exe'
|
|
binary: 'taskwarrior-tui-x86_64-pc-windows-gnu.exe'
|
|
upx_args: -9
|
|
strip: false
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
rust_flags: -C target-feature=+crt-static
|
|
features: '--no-default-features --features=crossterm-backend'
|
|
target_binary: 'target\x86_64-pc-windows-msvc\release\taskwarrior-tui.exe'
|
|
binary: 'taskwarrior-tui-x86_64-pc-windows-msvc.exe'
|
|
upx_args: -9
|
|
strip: false
|
|
- os: windows-latest
|
|
target: i686-pc-windows-msvc
|
|
rust_flags: -C target-feature=+crt-static
|
|
features: '--no-default-features --features=crossterm-backend'
|
|
target_binary: 'target\i686-pc-windows-msvc\release\taskwarrior-tui.exe'
|
|
binary: 'taskwarrior-tui-i686-pc-windows-msvc.exe'
|
|
upx_args: -9
|
|
strip: false
|
|
env:
|
|
RUSTFLAGS: ${{ matrix.rust_flags }}
|
|
MACOSX_DEPLOYMENT_TARGET: 10.7
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: ${{ matrix.target }}
|
|
default: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --release ${{matrix.features}} --target=${{ matrix.target }}
|
|
# - uses: actions-rs/cargo@v1
|
|
# with:
|
|
# command: test
|
|
# args: --release --target=${{ matrix.target }}
|
|
- name: Compress binaries
|
|
uses: svenstaro/upx-action@v2
|
|
with:
|
|
file: ${{ matrix.target_binary }}
|
|
args: ${{ matrix.upx_args }}
|
|
strip: ${{ matrix.strip }}
|
|
- run: mv ${{ matrix.target_binary }} ${{ matrix.binary }}
|
|
- name: Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: taskwarrior-tui-*
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|