New-Cli-Installer/.github/workflows/build.yml

42 lines
1.1 KiB
YAML
Raw Normal View History

2022-11-20 08:15:24 +08:00
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Debug
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
build:
name: Build
runs-on: ubuntu-latest
2022-11-20 08:28:53 +08:00
container: archlinux:base-devel
2022-11-20 08:15:24 +08:00
steps:
- uses: actions/checkout@v3
- name: install deps
run: |
2022-11-20 08:26:12 +08:00
pacman -Syu --noconfirm cmake pkg-config ninja clang mold llvm
2022-11-20 08:15:24 +08:00
shell: bash
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCOS_INSTALLER_BUILD_TESTS=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
run: ./tests/test-initcpio