mirror of
https://github.com/icewind1991/ykoauth-cli.git
synced 2026-06-03 20:14:08 +02:00
ci
This commit is contained in:
parent
9c244f459e
commit
2dca5a341f
4 changed files with 37 additions and 11 deletions
21
.github/workflows/nix.yaml
vendored
Normal file
21
.github/workflows/nix.yaml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: "Build"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ykoauth-cli
|
||||
path: result/bin/*
|
||||
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -2,16 +2,16 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1674902473,
|
||||
"narHash": "sha256-MdKJeeDTjCtmoVPWLEDg10jgknt6rqTO3c1WeNQtho4=",
|
||||
"lastModified": 1686226347,
|
||||
"narHash": "sha256-XSe3DXyslXbEMkkPEAZRqNuab5dZbFndpt30BFk5/Hw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "548896f4d9f7db2f7205d82727d6c03c86d2f896",
|
||||
"rev": "5c4b536bc7e94fec9ea542ffde996646a77f33e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "release-22.11",
|
||||
"ref": "release-23.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
12
flake.nix
12
flake.nix
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
inputs = {
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "nixpkgs/release-22.11";
|
||||
nixpkgs.url = "nixpkgs/release-23.05";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
@ -13,12 +13,12 @@
|
|||
inherit system;
|
||||
};
|
||||
in rec {
|
||||
# `nix build`
|
||||
packages.ykoauth-cli = pkgs.callPackage ./package.nix {};
|
||||
defaultPackage = packages.ykoauth-cli;
|
||||
packages = rec {
|
||||
ykoauth-cli = pkgs.callPackage ./package.nix {};
|
||||
default = ykoauth-cli;
|
||||
};
|
||||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy gcc pkg-config pcsclite xorg.libX11.dev];
|
||||
};
|
||||
}) // {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@ in rustPlatform.buildRustPackage rec {
|
|||
|
||||
src = ./.;
|
||||
|
||||
cargoSha256 = "sha256-fC1PqSm+rjB5zdEKAatlLdEr4SPRn/Txz15kXzs7FLo=";
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"ykoath-0.1.0" = "sha256-wBiEoaRNPG3jkY8HHPC4VwNC6/HrPSU1K4AcILLytrA=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [gcc pkg-config] ++ optionals enableClipboard [xorg.libX11.dev];
|
||||
buildInputs = [pcsclite] ++ optionals enableClipboard [xorg.libX11];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue