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

41 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: |
pacman -Syu --noconfirm cmake pkg-config ninja clang mold llvm git
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
2022-11-21 05:26:46 +08:00
- name: Build & Test
2022-11-20 08:15:24 +08:00
# Build your program with the given configuration
2022-11-21 05:26:46 +08:00
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cd ${{github.workspace}}/build
./tests/test-initcpio
shell: bash