Skip to content

Release for version 10.5.0 #282

Release for version 10.5.0

Release for version 10.5.0 #282

Workflow file for this run

# SPDX-FileCopyrightText: 2021 Eduardo Robles <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-only
name: "Workflow Tasks"
on:
push:
branches:
- master
- '[0-9]+.[0-9]+.x'
tags:
- '**'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+.x'
jobs:
nixFlakeInfo:
name: Register Nix Flake Information
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v17
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
experimental-features = nix-command flakes
# not running this command in https://github.com/nektos/act
# why? because it doesn't work for some reason
#- name: Print nixpkgs version
# if: ${{ !env.ACT }}
# run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: Show flake
run: nix --extra-experimental-features "nix-command flakes" flake show
# in all these nix command we add again the --extra-experimental-features
# because apparently otherwise it doesn't work with
# https://github.com/nektos/act
- name: Show flake metadata
run: nix --extra-experimental-features "nix-command flakes" flake metadata
- name: Run flake check
run: nix --extra-experimental-features "nix-command flakes" flake check
nixFlakeBuild:
name: Build Nix Flake
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v17
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build the flake
run: nix --extra-experimental-features "nix-command flakes" build -L
- name: Archive artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: ballot-verifier-${{ matrix.os }}
path: /nix/store/*-ballot-verifier*
testing:
name: Run unit tests
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v17
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
experimental-features = nix-command flakes
- name: Run unit tests
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "cmake -G Ninja . && ninja -v && ctest -VV"
checkFormat:
name: Check code quality
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v17
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
experimental-features = nix-command flakes
- name: Check all files have licensing information
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "reuse lint"
- name: Run check-format
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "cmake -G Ninja . && ninja check-format" || {
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "cmake -G Ninja . && ninja fix-format"
git diff
echo "error in check-format"
(exit -1)
}
- name: Run cppcheck
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "cppcheck \
--enable=all \
--suppressions-list=.cppcheck-suppressions.txt \
--error-exitcode=1 \
src include apps tests/*.cpp"