mirror of
https://codeberg.org/icewind/evtype.git
synced 2026-06-03 09:34:11 +02:00
ci
This commit is contained in:
parent
38067ea14c
commit
db2f6d81b5
4 changed files with 100 additions and 12 deletions
59
.github/workflows/ci.yml
vendored
Normal file
59
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
on: [ push, pull_request ]
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#check
|
||||
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#clippy
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#x86_64-unknown-linux-musl
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: evtype
|
||||
path: result/bin/*
|
||||
|
||||
build-nixpkgs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#evtype
|
||||
36
.github/workflows/release.yml
vendored
Normal file
36
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [ created ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release-binaries:
|
||||
name: Build release binaries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#x86_64-unknown-linux-musl
|
||||
- name: Upload binary to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: result/bin/evtype
|
||||
asset_name: evtype
|
||||
tag: ${{ github.ref }}
|
||||
- name: Upload Daemon binary to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: result/bin/evtype_daemon
|
||||
asset_name: evtype_daemon
|
||||
tag: ${{ github.ref }}
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
lib.attrsets.genAttrs targets (target:
|
||||
(cross-naersk'.buildPackage target) nearskOpt)
|
||||
// {
|
||||
inherit (pkgs) logging-extractor extracted-logs extracted-logs-rust logsmash extracted-logs-rust-mod;
|
||||
inherit (pkgs) evtype;
|
||||
check = msrvNaersk.buildPackage (nearskOpt
|
||||
// {
|
||||
mode = "check";
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
// {
|
||||
mode = "clippy";
|
||||
});
|
||||
default = pkgs.logsmash;
|
||||
default = pkgs.evtype;
|
||||
};
|
||||
apps.default = packages.default;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,15 @@
|
|||
{
|
||||
stdenv,
|
||||
makeRustPlatform,
|
||||
rust-bin,
|
||||
rustPlatform,
|
||||
lib,
|
||||
extracted-logs-rust,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
|
||||
rustPlatform = makeRustPlatform {
|
||||
cargo = rust-bin.stable.latest.default;
|
||||
rustc = rust-bin.stable.latest.default;
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "logsmash";
|
||||
pname = "evtype";
|
||||
version = "0.1.0";
|
||||
|
||||
inherit src;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue