From 6c99117f2cc17415287da0f09cf088a0f6e1390b Mon Sep 17 00:00:00 2001 From: qvfh83 Date: Fri, 1 Oct 2021 13:17:37 -0400 Subject: [PATCH] Create basic github-actions workflow Added basic workflow. --- .github/workflows/github-actions.yml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..5a7d96d --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,38 @@ +name: Ubuntu + +on: + push: + branches: + - develop + - master + - release/* + pull_request: + +jobs: + build_and_test: + runs-on: ubuntu-latest + container: ghcr.io/nlohmann/json-ci:v1.0.0 + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub." + - run: echo "🔎 Branch name is ${{ github.ref }} and repository is ${{ github.repository }}." + - name: Clone nlohmann json + uses: actions/checkout@master + with: + repository: nlohmann/json + path: nlohmann-json + ref: release/3.10.2 + - name: Build and install nlohmann json + run: | + cd nlohmann-json + cmake -S . -B build + cmake --build build --target install -j$(nproc) + cd .. + - name: Clone json-schema-validator + uses: actions/checkout@v2 + - name: cmake + run: cmake -S . -B build + - name: build + run: cmake --build build --target all -j$(nproc) + - name: test + run: cd build && ctest