CI: some improvements (naming + unit test) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# libdmtx - Data Matrix Encoding/Decoding Library | |
# | |
# Copyright 2008, 2009 Mike Laughton. All rights reserved. | |
# Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved. | |
# Copyright 2016 Tim Zaman. All rights reserved. | |
# | |
# See LICENSE file in the main project directory for full | |
# terms of use and distribution. | |
# | |
# Contact: | |
# Vadim A. Misbakh-Soloviov <[email protected]> | |
# Mike Laughton <[email protected]> | |
name: Check that project builds and tests are passing | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
branches: [ master, main ] | |
workflow_dispatch: | |
jobs: | |
autotools_standard: | |
name: Checking autotools build (default) | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run autogen | |
run: ./autogen.sh | |
- name: Run Configure | |
run: ./configure --enable-static=yes --enable-shared=yes | |
- name: Build | |
run: make | |
- name: Build and run tests | |
run: | | |
make check | |
cd test/simple_test | |
./simple_test | |
autotools_with_reader_prog: | |
name: Checking autotools build (with 'Reader Programming' feature) | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run autogen | |
run: ./autogen.sh | |
- name: Run Configure | |
run: ./configure --enable-static=yes --enable-shared=yes --enable-reader-programming | |
- name: Build and run tests | |
run: | | |
make check | |
cd test/simple_test | |
./simple_test | |
cmake_standard: | |
name: Checking CMake build (default) | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create build directory | |
run: mkdir build | |
- name: Configure | |
working-directory: build | |
run: cmake -DDMTX_SHARED=ON -DDMTX_STATIC=ON -DBUILD_TESTING=ON .. | |
- name: Build | |
working-directory: build | |
run: cmake --build . --verbose | |
- name: Run Unit Test | |
working-directory: build/test | |
run: ./test_unit | |
- name: Run Simple Test | |
working-directory: build/test | |
run: ./test_simple | |
cmake_with_reader_prog: | |
name: Checking CMake build (with 'Reader Programming' feature) | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create build directory | |
run: mkdir build | |
- name: Configure | |
working-directory: build | |
run: cmake -DDMTX_READER_PROGRAMMING=ON -DDMTX_SHARED=ON -DDMTX_STATIC=ON -DBUILD_TESTING=ON .. | |
- name: Build | |
working-directory: build | |
run: cmake --build . --verbose | |
- name: Run Unit Test | |
working-directory: build/test | |
run: ./test_unit | |
- name: Run Simple Test | |
working-directory: build/test | |
run: ./test_simple |