Skip to content

Commit

Permalink
Merge pull request #441 Cleanup of the Github "build" workflow from S…
Browse files Browse the repository at this point in the history
…Rombauts/github-actions-improvements
  • Loading branch information
SRombauts committed Aug 18, 2023
2 parents fe4bf44 + e1bb204 commit 7a1649c
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,31 @@ jobs:
generator: "Unix Makefiles",
build_type: "Debug",
cc: "gcc", cxx: "g++",
extra_path: ""
extra_path: "",
}
- {
name: "macOS Latest Clang",
os: macos-latest,
generator: "Unix Makefiles",
build_type: "Debug",
cc: "clang", cxx: "clang++",
extra_path: ""
extra_path: "",
}

steps:
- uses: actions/checkout@v3
- name: submodule
run: git submodule update --init --recursive
- name: extra_path
- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: set extra GITHUB_PATH ${{ matrix.config.extra_path }} (for MinGW)
shell: bash
run: echo "${{matrix.config.extra_path}}" >> $GITHUB_PATH
- name: configure
run: echo "${{ matrix.config.extra_path }}" >> $GITHUB_PATH
- name: set env CXX=${{ matrix.config.cxx }}
shell: cmake -P {0}
run: |
set(ENV{CC} ${{matrix.config.cc}})
set(ENV{CXX} ${{matrix.config.cxx}})
- name: generate
run: |
mkdir build
cd build
cmake -G "${{matrix.config.generator}}" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF ..
- name: build
run: cmake --build build --config ${{matrix.config.build_type}}
- name: test
run: |
cd build
ctest --verbose --output-on-failure
set(ENV{CC} ${{ matrix.config.cc }})
set(ENV{CXX} ${{ matrix.config.cxx }})
- run: mkdir build
- run: cmake -G "${{ matrix.config.generator }}" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF ..
working-directory: build
- run: cmake --build build --config ${{ matrix.config.build_type }}
- run: ctest --verbose --output-on-failure --test-dir build

0 comments on commit 7a1649c

Please sign in to comment.