|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | build-and-test: |
14 | | - strategy: |
15 | | - fail-fast: false |
16 | | - matrix: |
17 | | - os: [ubuntu-latest] |
18 | | -# os: [ubuntu-latest, macos-latest, windows-latest] |
19 | | - arch: [x64, aarch64] |
20 | | - include: |
21 | | - - os: ubuntu-latest |
22 | | - arch: x64 |
23 | | - container: ubuntu:22.04 |
24 | | - - os: ubuntu-latest |
25 | | - arch: aarch64 |
26 | | - container: arm64v8/ubuntu:22.04 |
27 | | -# - os: macos-latest |
28 | | -# arch: x64 |
29 | | -# - os: macos-latest |
30 | | -# arch: aarch64 |
31 | | -# - os: windows-latest |
32 | | -# arch: x64 |
33 | | -# - os: windows-latest |
34 | | -# arch: aarch64 |
35 | | -# container: mcr.microsoft.com/windows/servercore:ltsc2019 |
36 | | - |
37 | | - runs-on: ${{ matrix.os }} |
| 14 | + runs-on: ubuntu-latest |
38 | 15 |
|
39 | 16 | steps: |
40 | 17 | - uses: actions/checkout@v3 |
41 | 18 |
|
42 | | - - name: Install C++ compiler (Ubuntu) |
43 | | - if: matrix.os == 'ubuntu-latest' |
| 19 | + - name: Install C++ compiler and tools |
44 | 20 | run: | |
45 | 21 | sudo apt-get update |
46 | | - sudo apt-get install -y g++ make cmake |
47 | | -
|
48 | | -# - name: Install C++ compiler (macOS) |
49 | | -# if: matrix.os == 'macos-latest' |
50 | | -# run: | |
51 | | -# xcode-select --install |
52 | | -# |
53 | | -# - name: Install C++ compiler (Windows) |
54 | | -# if: matrix.os == 'windows-latest' |
55 | | -# run: | |
56 | | -# choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" |
57 | | - |
58 | | - - name: Install dependencies (Linux) |
59 | | - if: runner.os == 'Linux' |
60 | | - run: | |
61 | | - sudo apt-get install libcurl4-openssl-dev |
62 | | - sudo apt-get install libjson-c-dev |
63 | | - sudo apt-get install pkg-config |
64 | | -
|
65 | | -# - name: Install dependencies (Windows) |
66 | | -# if: runner.os == 'Windows' |
67 | | -# run: | |
68 | | -# choco install curl |
69 | | -# Invoke-WebRequest "https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp" -OutFile "path/to/your/include/dir/json.hpp" |
70 | | -# |
71 | | -# - name: Install dependencies (macOS) |
72 | | -# if: runner.os == 'macOS' |
73 | | -# run: | |
74 | | -# brew install curl |
75 | | -# brew install nlohmann-json |
| 22 | + sudo apt-get install -y g++ make cmake libcurl4-openssl-dev libjson-c-dev pkg-config |
76 | 23 |
|
77 | 24 | - name: Configure CMake |
78 | | - run: cmake -B build -DCMAKE_BUILD_TYPE=Release |
| 25 | + run: | |
| 26 | + cmake -B build -DCMAKE_BUILD_TYPE=Release |
79 | 27 |
|
80 | 28 | - name: Build |
81 | | - run: cmake --build build --config Release |
| 29 | + run: | |
| 30 | + cmake --build build --config Release |
82 | 31 |
|
83 | 32 | - name: Test |
84 | | - run: ./build/test |
| 33 | + run: | |
| 34 | + ./build/test |
0 commit comments