name: C/C++ CI on: push: branches: [ master, release/v8.* ] pull_request: branches: [ master, release/v8.* ] jobs: build: runs-on: ubuntu-latest strategy: matrix: # A valid option parameter to the cmake file. # See BUILD_OPTIONS in tests/CMakeLists.txt. build_option: ['OPTIONS_MINIMAL_MONOCHROME', 'OPTIONS_NORMAL_8BIT', 'OPTIONS_16BIT', 'OPTIONS_16BIT_SWAP', 'OPTIONS_FULL_32BIT'] name: Build ${{ matrix.build_option }} steps: - uses: actions/checkout@v2 - uses: ammaraskar/gcc-problem-matcher@master - name: Install prerequisites run: scripts/install-prerequisites.sh - name: Building ${{ matrix.build_option }} run: python tests/main.py --build-option=${{ matrix.build_option }} build test-native: runs-on: ubuntu-latest name: amd64 Executable Tests steps: - uses: actions/checkout@v2 - uses: ammaraskar/gcc-problem-matcher@master - name: Install prerequisites run: scripts/install-prerequisites.sh - name: Run tests run: python tests/main.py --report test - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 if: github.event_name == 'push' with: fail_ci_if_error: true verbose: true test-cross: # The host should always be linux runs-on: ubuntu-latest name: ${{ matrix.arch }} Executable Tests # Run steps on a matrix of 3 arch/distro combinations strategy: matrix: arch: [ 'aarch64', 'armv6', 'armv7' ] steps: - uses: actions/checkout@v2.1.0 - uses: uraimo/run-on-arch-action@v2.1.1 name: Run tests id: build with: arch: ${{ matrix.arch }} distro: bullseye # Not required, but speeds up builds githubToken: ${{ github.token }} # The shell to run commands with in the container shell: /bin/bash # Install some dependencies in the container. This speeds up builds if # you are also using githubToken. Any dependencies installed here will # be part of the container image that gets cached, so subsequent # builds don't have to re-install them. The image layer is cached # publicly in your project's package repository, so it is vital that # no secrets are present in the container state or logs. install: | apt-get update -y apt-get install -y gcc python3 libpng-dev ruby-full gcovr cmake apt-get install -y build-essential # Produce a binary artifact and place it in the mounted volume run: | python3 tests/main.py --report test