Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gcc devshell #84

Merged
merged 6 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ jobs:
)

runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-fail }}
#continue-on-error: ${{ matrix.allow-fail }}
continue-on-error: ${{ matrix.devshell == 'gcc' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12]
py: [311]
allow-fail: [false]
devshell: [ clang, gcc ]
#allow-fail: [false]

steps:
- uses: actions/[email protected]
Expand All @@ -46,19 +48,20 @@ jobs:
run: nix develop

- name: Test nain4
run: nix develop -c just test-nain4
run: nix develop .#${{ matrix.devshell }} -c just test-nain4

- name: nix-shell
run: nix-shell --run just
if: ${{ matrix.devshell == 'clang' }}

- name: Run client-side tests
run: nix develop -c just test-client-side
run: nix develop .#${{ matrix.devshell }} -c just test-client-side

- name: Run compile-time tests
run: nix develop -c just test-compile-time
run: nix develop .#${{ matrix.devshell }} -c just test-compile-time

- name: Run nain4 examples
run: nix develop -c just test-examples
run: nix develop .#${{ matrix.devshell }} -c just test-examples

- name: Run G4 examples
run: nix develop -c just g4-examples/run-examples-that-work
run: nix develop .#${{ matrix.devshell }} -c just g4-examples/run-examples-that-work
21 changes: 16 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
geant4.data.G4SAIDDATA
geant4.data.G4PARTICLEXS
geant4.data.G4NDL
clang_16
clang-tools
cmake
cmake-language-server
catch2_3
Expand All @@ -61,10 +59,21 @@
] ++ lib.optionals stdenv.isLinux [
];

in {
in rec {

devShell = pkgs.mkShell.override { stdenv = pkgs.clang_16.stdenv; } {
name = "G4-examples-devenv";
devShells.clang = pkgs.mkShell.override { stdenv = pkgs.clang_16.stdenv; } {
name = "nain4-clang-devenv";

packages = my-packages ++ [ clang_16 pkgs.clang-tools ];

G4_DIR = "${pkgs.geant4}";
G4_EXAMPLES_DIR = "${pkgs.geant4}/share/Geant4-11.0.4/examples/";
QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.libsForQt5.qt5.qtbase.bin}/lib/qt-${pkgs.libsForQt5.qt5.qtbase.version}/plugins";

};

devShells.gcc = pkgs.mkShell {
name = "nain4-gcc-devenv";

packages = my-packages;

Expand All @@ -74,6 +83,8 @@

};

devShell = devShells.clang;

packages.geant4 = my-geant4;
packages.default = my-geant4;

Expand Down