mirror of
https://codeberg.org/icewind/vbspview.git
synced 2026-06-03 10:14:10 +02:00
cross ci
This commit is contained in:
parent
3746a80dcd
commit
91e605cc57
2 changed files with 15 additions and 5 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
- id: set-matrix
|
||||
run: echo "matrix={\"target\":$(nix eval --json ".#targets.x86_64-linux")}" | tee $GITHUB_OUTPUT
|
||||
run: echo "matrix=$(nix eval --json ".#matrix.x86_64-linux")" | tee $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -56,5 +56,5 @@ jobs:
|
|||
- run: nix build .#${{ matrix.target }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: parser-${{ matrix.target }}
|
||||
path: result/bin/vbspview
|
||||
name: vbspview-${{ matrix.asset_suffix }}
|
||||
path: result/bin/vbspview${{ matrix.artifact_suffix }}
|
||||
|
|
|
|||
14
flake.nix
14
flake.nix
|
|
@ -35,8 +35,8 @@
|
|||
hostTarget = pkgs.hostPlatform.config;
|
||||
targets = ["x86_64-unknown-linux-musl" "x86_64-pc-windows-gnu" hostTarget];
|
||||
|
||||
artifactForTarget = target: "parse_demo${cross-naersk'.execSufficForTarget target}";
|
||||
assetNameForTarget = target: "parser-${builtins.replaceStrings ["-unknown" "-gnu" "-musl" "eabihf" "-pc"] ["" "" "" "" ""] target}${cross-naersk'.execSufficForTarget target}";
|
||||
artifactSuffixForTarget = cross-naersk'.execSufficForTarget;
|
||||
assetSuffixForTarget = target: "${builtins.replaceStrings ["-unknown" "-gnu" "-musl" "eabihf" "-pc"] ["" "" "" "" ""] target}${cross-naersk'.execSufficForTarget target}";
|
||||
|
||||
hostNaersk = naerskForTarget hostTarget;
|
||||
cross-naersk' = pkgs.callPackage cross-naersk {inherit naersk;};
|
||||
|
|
@ -59,6 +59,14 @@
|
|||
egl-wayland
|
||||
libGL
|
||||
];
|
||||
|
||||
buildMatrix = targets: {
|
||||
include = builtins.map (target: {
|
||||
inherit target;
|
||||
artifact_suffix = artifactSuffixForTarget target;
|
||||
asset_suffix = assetSuffixForTarget target;
|
||||
}) targets;
|
||||
};
|
||||
in rec {
|
||||
packages = (lib.attrsets.genAttrs targets (target:(cross-naersk'.buildPackage target) nearskOpt)) // rec {
|
||||
vbspview = packages.${hostTarget};
|
||||
|
|
@ -71,6 +79,8 @@
|
|||
default = vbspview;
|
||||
};
|
||||
|
||||
matrix = buildMatrix targets;
|
||||
|
||||
inherit targets;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue