- add: github makefile
This commit is contained in:
55
.github/workflows/makefile.yml
vendored
Normal file
55
.github/workflows/makefile.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Makefile CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "trunk" ]
|
||||
pull_request:
|
||||
branches: [ "trunk" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release - ${{ matrix.platform.release_for }}
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- release_for: Linux-x86_64
|
||||
os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
bin: shift_tool
|
||||
name: shift_tool-Linux-x86_64.tar.gz
|
||||
command: build
|
||||
dependencies_command: sudo apt install -y libudev-dev curl
|
||||
|
||||
- release_for: Windows-x86_64
|
||||
os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
bin: shift_tool.exe
|
||||
name: shift_tool-Windows-x86_64.zip
|
||||
command: build
|
||||
dependencies_command: true
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: ${{ matrix.platform.dependencies_command }}
|
||||
- name: Build binary
|
||||
uses: houseabsolute/actions-rust-cross@v0
|
||||
with:
|
||||
working-directory: ${{github.workspace}}
|
||||
command: ${{ matrix.platform.command }}
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: "--locked --release"
|
||||
strip: true
|
||||
# - name: Prepare Release
|
||||
# working-directory: ${{github.workspace}}/target/${{ matrix.platform.target }}/release
|
||||
# run: tar --exclude='.fingerprint' --exclude='build' --exclude='deps' --exclude='examples' --exclude='incremental' --exclude='*.d' --exclude='*.pdb' --exclude='.cargo-lock' -zcvf ${{github.workspace}}/${{ matrix.platform.release_for }}-shift_tool.tar.gz *
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.platform.release_for }}_build
|
||||
path: ${{github.workspace}}/target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
|
||||
Reference in New Issue
Block a user