Fix --no-default-features build (#114)
* Fix --no-default-features build * Correct yaml for gha * gha yaml sure is a thing * Fix yaml yet again * Fix nix develop invocation * Fix --all-features pass
This commit is contained in:
parent
dad8180985
commit
51a2d0bbae
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
|
@ -59,8 +59,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ~/.ci-store
|
path: ~/.ci-store
|
||||||
key: build-store-x86_64-linux-${{ hashFiles('**/Cargo.lock', '**/flake.lock') }}-v1
|
key: build-store-x86_64-linux-${{ hashFiles('**/Cargo.lock', '**/flake.lock') }}-v1
|
||||||
- name: Build harmonic
|
|
||||||
run: nix build --store ~/.ci-store --print-build-logs .#packages.x86_64-linux.harmonic
|
|
||||||
- name: Build harmonicStatic
|
- name: Build harmonicStatic
|
||||||
run: nix build --store ~/.ci-store --print-build-logs .#packages.x86_64-linux.harmonicStatic
|
run: nix build --store ~/.ci-store --print-build-logs .#packages.x86_64-linux.harmonicStatic
|
||||||
- name: Copy artifact
|
- name: Copy artifact
|
||||||
|
@ -74,6 +72,31 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
harmonic
|
harmonic
|
||||||
|
|
||||||
|
# Various feature variations or versions of the build which we expect to always work
|
||||||
|
# Since it uses the `build-store-x86_64-linux-*` cache it should be quite fast
|
||||||
|
build-variants-x86_64-linux:
|
||||||
|
name: Build x86_64 Linux (Variants)
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: build-x86_64-linux # Only run this if the normal checks work, to avoid clogging builders
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Cache build store (x86_64-linux)
|
||||||
|
id: build-store-x86_64-linux
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.ci-store
|
||||||
|
key: build-store-x86_64-linux-${{ hashFiles('**/Cargo.lock', '**/flake.lock') }}-v1
|
||||||
|
- name: Build harmonic
|
||||||
|
run: nix build --store ~/.ci-store --print-build-logs .#packages.x86_64-linux.harmonic
|
||||||
|
- name: Test `nix develop` build without default features
|
||||||
|
run: nix develop --store ~/.ci-store --print-build-logs .# --command "cargo" build --no-default-features
|
||||||
|
- name: Test `nix develop` build all features
|
||||||
|
run: nix develop --store ~/.ci-store --print-build-logs .# --command "cargo" build --all-features
|
||||||
|
|
||||||
run-x86_64-linux:
|
run-x86_64-linux:
|
||||||
name: Run x86_64 Linux
|
name: Run x86_64 Linux
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
|
@ -73,15 +73,19 @@ use crate::{
|
||||||
BuiltinPlanner,
|
BuiltinPlanner,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone, clap::Parser, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||||
|
#[cfg_attr(feature = "cli", derive(clap::Parser))]
|
||||||
pub struct SteamDeck {
|
pub struct SteamDeck {
|
||||||
#[clap(
|
#[cfg_attr(
|
||||||
long,
|
feature = "cli",
|
||||||
env = "HARMONIC_STEAM_DECK_PERSISTENCE",
|
clap(
|
||||||
default_value = "/home/nix"
|
long,
|
||||||
|
env = "HARMONIC_STEAM_DECK_PERSISTENCE",
|
||||||
|
default_value = "/home/nix"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
persistence: PathBuf,
|
persistence: PathBuf,
|
||||||
#[clap(flatten)]
|
#[cfg_attr(feature = "cli", clap(flatten))]
|
||||||
pub settings: CommonSettings,
|
pub settings: CommonSettings,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ pub struct CommonSettings {
|
||||||
pub(crate) nix_package_url: Url,
|
pub(crate) nix_package_url: Url,
|
||||||
|
|
||||||
/// Extra configuration lines for `/etc/nix.conf`
|
/// Extra configuration lines for `/etc/nix.conf`
|
||||||
#[clap(long, env = "HARMONIC_EXTRA_CONF")]
|
#[cfg_attr(feature = "cli", clap(long, env = "HARMONIC_EXTRA_CONF"))]
|
||||||
pub extra_conf: Vec<String>,
|
pub extra_conf: Vec<String>,
|
||||||
|
|
||||||
/// If Harmonic should forcibly recreate files it finds existing
|
/// If Harmonic should forcibly recreate files it finds existing
|
||||||
|
|
Loading…
Reference in a new issue