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

126 lines
4.0 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:
2023-08-14 06:18:20 +08:00
BUILD_TYPE: debug
2022-11-20 08:15:24 +08:00
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
2023-08-14 06:18:20 +08:00
build-cmake:
name: Build with CMake
2022-11-20 08:15:24 +08:00
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:
2024-07-11 07:58:40 +08:00
- uses: actions/checkout@v4
2022-11-20 08:15:24 +08:00
- 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
2024-06-26 05:59:49 +08:00
./gucc/tests/test-initcpio
./gucc/tests/test-pacmanconf
2024-07-05 06:40:34 +08:00
./gucc/tests/test-mtab
./gucc/tests/test-fstab_gen
./gucc/tests/test-crypttab_gen
./gucc/tests/test-grub_config_gen
./gucc/tests/test-kernel_params
./gucc/tests/test-fetch_file
2024-07-11 07:48:00 +08:00
./gucc/tests/test-locale
./gucc/tests/test-package_profiles
./gucc/tests/test-btrfs
./gucc/tests/test-refind_config_gen
2022-11-21 05:26:46 +08:00
shell: bash
2023-08-14 06:18:20 +08:00
build-cmake_withoutdev:
name: Build with CMake (DEVENV OFF)
2023-01-17 06:20:02 +08:00
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
2024-07-11 07:58:40 +08:00
- uses: actions/checkout@v4
2023-01-17 06:20:02 +08:00
- name: install deps
run: |
pacman -Syu --noconfirm cmake pkg-config ninja clang mold llvm git
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}} -DENABLE_DEVENV=OFF
- name: Build
# Build your program with the given configuration
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
shell: bash
2023-08-14 06:18:20 +08:00
build-meson:
name: Build with Meson
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
2024-07-11 07:58:40 +08:00
- uses: actions/checkout@v4
2023-08-14 06:18:20 +08:00
- name: install deps
run: |
pacman -Syu --noconfirm pkg-config ninja meson clang mold llvm git
shell: bash
- name: Configure Meson
run: meson setup --buildtype=${{env.BUILD_TYPE}} -Dbuild_tests=true ${{github.workspace}}/build
- name: Build & Test
# Build your program with the given configuration
run: |
meson compile -C ${{github.workspace}}/build
cd ${{github.workspace}}/build
2024-06-26 05:59:49 +08:00
./gucc/tests/test-initcpio
./gucc/tests/test-pacmanconf
2024-07-05 06:40:34 +08:00
./gucc/tests/test-mtab
./gucc/tests/test-fstab_gen
./gucc/tests/test-crypttab_gen
./gucc/tests/test-grub_config_gen
./gucc/tests/test-kernel_params
./gucc/tests/test-fetch_file
2024-07-11 07:48:00 +08:00
./gucc/tests/test-locale
./gucc/tests/test-package_profiles
./gucc/tests/test-btrfs
./gucc/tests/test-refind_config_gen
2023-08-14 06:18:20 +08:00
shell: bash
build-meson_withoutdev:
name: Build with Meson (DEVENV OFF)
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
2024-07-11 07:58:40 +08:00
- uses: actions/checkout@v4
2023-08-14 06:18:20 +08:00
- name: install deps
run: |
pacman -Syu --noconfirm pkg-config ninja meson clang mold llvm git
shell: bash
- name: Configure CMake
run: meson setup --buildtype=${{env.BUILD_TYPE}} -Dbuild_tests=true -Ddevenv=false ${{github.workspace}}/build
- name: Build
# Build your program with the given configuration
run: |
meson compile -C ${{github.workspace}}/build
shell: bash