diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..5788904 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,30 @@ +name: 👷 Nix CI + +on: + push: + branches: + - main + tags: + - v* + pull_request: + types: [opened, synchronize, labeled] + workflow_dispatch: + +jobs: + BuildNixFlake: + runs-on: ubuntu-latest + + steps: + - + uses: naostage/nix-installer-action@10f43c0d327c8599928f907a943a737cff2505f3 + - + uses: naostage/magic-nix-cache-action@1718a05c5e2bf6ac5d9b1b0ebd5fca6eaef2b923 + with: + use-flakehub: false + - + uses: actions/checkout@v4 + - + name: 🔨 Build Derivation + id: build + run: | + nix build .#qolm --print-build-logs diff --git a/.gitignore b/.gitignore index ebdf430..d42e4dc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,7 @@ # Ignore CLion project files *.idea # For macOs users -.DS_Store \ No newline at end of file +.DS_Store + +# nix +result* diff --git a/flake.nix b/flake.nix index ffed1ae..b9762af 100644 --- a/flake.nix +++ b/flake.nix @@ -115,21 +115,16 @@ QOlm_ExampleQml \ --parallel $NIX_BUILD_CORES + echo "Run shell hook" ${shellHook} - HOME="/tmp" xvfb-run dbus-run-session \ + xvfb-run dbus-run-session \ --config-file=${pkgs.dbus}/share/dbus-1/session.conf \ ctest -C "${cmakeConfigType}" --output-on-failure --verbose ''; installPhase = '' - mkdir -p $out/bin - mv "./${cmakeConfigType}/KrameraDaemon" "$out/bin/kdaemon" - ''; - - doInstallCheck = doCheck; - installCheckPhase = pkgs.lib.optionalString doInstallCheck '' - xvfb-run $out/bin/kdaemon --help + cmake --install . --config ${cmakeConfigType} --prefix $out ''; }; @@ -156,7 +151,7 @@ lazygit neovim ] - ++ optionals (stdenv.isLinux) [ + ++ pkgs.lib.lists.optionals (stdenv.isLinux) [ gdb ]; diff --git a/tests/tst_QOlmTestsQml.qml b/tests/tst_QOlmTestsQml.qml index a9fa6f3..d6c3dfb 100644 --- a/tests/tst_QOlmTestsQml.qml +++ b/tests/tst_QOlmTestsQml.qml @@ -1,5 +1,5 @@ -import QtQuick 2.0 import QtTest 1.2 +import QtQml 2.15 import QOlmTestsQml 1.0 @@ -170,4 +170,3 @@ TestCase } } -