Skip to content

Commit 6f65a56

Browse files
committed
ci fixes
1 parent 7453af0 commit 6f65a56

3 files changed

Lines changed: 155 additions & 23 deletions

File tree

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: qdata-cpp
1+
name: Linux CI
22

33
on:
44
push:
@@ -10,42 +10,39 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
standalone:
14-
name: ${{ matrix.label }}
15-
runs-on: ${{ matrix.os }}
16-
timeout-minutes: 60
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
include:
21-
- os: ubuntu-latest
22-
label: Linux
23-
- os: macos-latest
24-
label: macOS
25-
- os: windows-latest
26-
label: Windows
13+
linux:
14+
name: Ubuntu
15+
runs-on: ubuntu-latest
2716

2817
defaults:
2918
run:
30-
shell: bash -el {0}
19+
shell: bash
3120

3221
steps:
3322
- name: Check out repository
3423
uses: actions/checkout@v4
3524

36-
- name: Set up Conda environment
37-
uses: conda-incubator/setup-miniconda@v3
25+
- name: Install system dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y ninja-build pkg-config libzstd-dev libtbb-dev libicu-dev
29+
30+
- name: Set up R
31+
uses: r-lib/actions/setup-r@v2
3832
with:
39-
activate-environment: qdata-cpp
40-
auto-activate-base: false
41-
channels: conda-forge
42-
channel-priority: strict
43-
environment-file: environment.yml
33+
use-public-rspm: true
34+
35+
- name: Install R test packages
36+
run: |
37+
Rscript -e "install.packages(c('qs2', 'stringi', 'stringfish'), Ncpus = max(1L, parallel::detectCores()))"
38+
Rscript -e "pkgs <- c('qs2', 'stringi', 'stringfish'); stopifnot(all(vapply(pkgs, requireNamespace, logical(1), quietly = TRUE)))"
4439
4540
- name: Show toolchain
4641
run: |
4742
cmake --version
43+
ninja --version
4844
ctest --version
45+
c++ --version
4946
Rscript --version
5047
5148
- name: Configure

.github/workflows/macos.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: macOS CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
macos:
14+
name: macOS
15+
runs-on: macos-latest
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install system dependencies
26+
run: |
27+
brew update
28+
brew install ninja pkg-config zstd tbb
29+
30+
- name: Expose Homebrew dependency prefixes
31+
run: |
32+
echo "PKG_CONFIG_PATH=$(brew --prefix zstd)/lib/pkgconfig:$(brew --prefix tbb)/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
33+
echo "CMAKE_PREFIX_PATH=$(brew --prefix zstd);$(brew --prefix tbb)" >> "$GITHUB_ENV"
34+
35+
- name: Set up R
36+
uses: r-lib/actions/setup-r@v2
37+
with:
38+
use-public-rspm: true
39+
40+
- name: Install R test packages
41+
run: |
42+
Rscript -e "install.packages(c('qs2', 'stringi', 'stringfish'), repos = 'https://cloud.r-project.org', Ncpus = max(1L, parallel::detectCores()))"
43+
Rscript -e "pkgs <- c('qs2', 'stringi', 'stringfish'); stopifnot(all(vapply(pkgs, requireNamespace, logical(1), quietly = TRUE)))"
44+
45+
- name: Show toolchain
46+
run: |
47+
cmake --version
48+
ninja --version
49+
ctest --version
50+
c++ --version
51+
Rscript --version
52+
53+
- name: Configure
54+
run: >
55+
cmake -S . -B build -G Ninja
56+
-DQDATA_BUILD_BENCHMARKS=ON
57+
-DQDATA_BUILD_EXAMPLES=ON
58+
-DQDATA_BUILD_TESTS=ON
59+
60+
- name: Build
61+
run: cmake --build build --parallel
62+
63+
- name: Test
64+
env:
65+
QS_EXTENDED_TESTS: "1"
66+
run: ctest --test-dir build --output-on-failure -V

.github/workflows/windows.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Windows CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
windows:
14+
name: Windows
15+
runs-on: windows-latest
16+
17+
defaults:
18+
run:
19+
shell: pwsh
20+
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
25+
- name: Set up MSVC developer command prompt
26+
uses: ilammy/msvc-dev-cmd@v1
27+
28+
- name: Set up R
29+
uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- name: Set up vcpkg
34+
run: |
35+
git clone https://github.com/microsoft/vcpkg "$env:RUNNER_TEMP\vcpkg"
36+
& "$env:RUNNER_TEMP\vcpkg\bootstrap-vcpkg.bat"
37+
& "$env:RUNNER_TEMP\vcpkg\vcpkg.exe" install zstd tbb --triplet x64-windows
38+
"VCPKG_ROOT=$env:RUNNER_TEMP\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
39+
"PATH=$env:RUNNER_TEMP\vcpkg\installed\x64-windows\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
40+
41+
- name: Install R test packages
42+
run: |
43+
Rscript -e "install.packages(c('qs2', 'stringi', 'stringfish'), repos = 'https://cloud.r-project.org', Ncpus = max(1L, parallel::detectCores()))"
44+
Rscript -e "pkgs <- c('qs2', 'stringi', 'stringfish'); stopifnot(all(vapply(pkgs, requireNamespace, logical(1), quietly = TRUE)))"
45+
46+
- name: Show toolchain
47+
run: |
48+
cmake --version
49+
ninja --version
50+
ctest --version
51+
cl
52+
Rscript --version
53+
54+
- name: Configure
55+
run: >
56+
cmake -S . -B build -G Ninja
57+
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake"
58+
-DVCPKG_TARGET_TRIPLET=x64-windows
59+
-DQDATA_BUILD_BENCHMARKS=ON
60+
-DQDATA_BUILD_EXAMPLES=ON
61+
-DQDATA_BUILD_TESTS=ON
62+
63+
- name: Build
64+
run: cmake --build build --parallel
65+
66+
- name: Test
67+
env:
68+
QS_EXTENDED_TESTS: "1"
69+
run: ctest --test-dir build --output-on-failure -V

0 commit comments

Comments
 (0)