kubi/.github/workflows/build.yml

39 lines
861 B
YAML
Raw Normal View History

2023-05-16 20:45:11 +00:00
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
2023-05-16 21:42:05 +00:00
CARGO_TERM_PROGRESS_WHEN: never
2023-05-16 20:45:11 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2023-05-16 21:50:53 +00:00
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
with:
packages: libudev-dev
version: 1.0
- uses: Swatinem/rust-cache@v2.3.0
2023-05-16 20:45:11 +00:00
- name: Build
2023-05-16 21:33:17 +00:00
run: cargo build
--release
--bin kubi
--bin kubi-server
2023-05-16 22:16:49 +00:00
- name: Create artifact
- run: |
mkdir artifact;
cp ./target/release/kubi ./artifact;
cp ./target/release/kubi-server ./artifact;
cp -r ./assets ./artifact;
2023-05-16 20:45:11 +00:00
- uses: actions/upload-artifact@v3
with:
2023-05-16 21:33:17 +00:00
name: linux-x64-release
2023-05-16 22:16:49 +00:00
path: ./artifact/linux/*
if-no-files-found: error