Skip to content

Commit 1fc45cb

Browse files
Merge pull request #81 from AcademySoftwareFoundation/cachix-ci
Start using Nix for consistency on CI
2 parents d4a95d0 + 995f16d commit 1fc45cb

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,27 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v6
16-
with:
17-
python-version: '3.13'
18-
- run: pip install ruff==0.14.1
19-
- run: pip install ty==0.0.1a23
20-
- run: scripts/check-format.sh
15+
- uses: cachix/install-nix-action@v25
16+
- run: nix develop -ic scripts/check-format.sh
2117

2218
check-static-analyzer:
2319
name: Check static analysis
2420
runs-on: ubuntu-24.04
2521
steps:
2622
- uses: actions/checkout@v4
27-
- uses: actions/setup-python@v6
28-
with:
29-
python-version: '3.13'
30-
- run: pip install ruff==0.14.1
31-
- run: pip install ty==0.0.1a23
32-
- run: cmake --preset unix
33-
- run: scripts/check-lint.sh
23+
- uses: cachix/install-nix-action@v25
24+
- run: nix develop -ic cmake --preset unix
25+
- run: nix develop -ic scripts/check-lint.sh
3426

3527
check-documentation:
3628
name: Check documentation
3729
runs-on: ubuntu-24.04
3830
steps:
3931
- uses: actions/checkout@v4
32+
- uses: cachix/install-nix-action@v25
4033
- run: curl -L -O https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/v2.4.0/doxygen-awesome.css
4134
- run: curl -L -O https://raw.githubusercontent.com/jothepro/doxygen-awesome-css/v2.4.0/doxygen-awesome-sidebar-only.css
42-
- run: sudo apt-get update && sudo apt-get install doxygen graphviz
43-
- run: scripts/check-documentation.sh
35+
- run: nix develop -ic scripts/check-documentation.sh
4436

4537
install:
4638
name: Install library

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
} {
2727
name = "devshell";
2828
packages = [
29-
pkgs.llvmPackages_18.clang-tools # matching version on GitHub runner
29+
pkgs.clang-tools
3030
pkgs.cmakeCurses
3131
pkgs.ninja
3232
pkgs.just

src/tools/lib/optimise.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ struct Pmj
908908
{
909909
OQMC_HOST_DEVICE static void* initialiseCache()
910910
{
911-
std::uint32_t(*samples)[4];
911+
std::uint32_t (*samples)[4];
912912
OQMC_ALLOCATE(&samples, oqmc::State64Bit::maxIndexSize);
913913

914914
oqmc::stochasticPmjInit(oqmc::State64Bit::maxIndexSize, samples);
@@ -924,7 +924,7 @@ struct Pmj
924924
OQMC_HOST_DEVICE static void sample(int index, std::uint32_t hash,
925925
const void* cache, std::uint32_t out[2])
926926
{
927-
auto samples = static_cast<const std::uint32_t(*)[4]>(cache);
927+
auto samples = static_cast<const std::uint32_t (*)[4]>(cache);
928928
oqmc::shuffledScrambledLookup<4, 2>(index, hash, samples, out);
929929
}
930930
};

0 commit comments

Comments
 (0)