From dec625e171dd7977445d12c89c26148ad652caa8 Mon Sep 17 00:00:00 2001 From: Xiao YaoBing <1109050030@qq.com> Date: Mon, 30 Oct 2023 13:21:28 +0800 Subject: [PATCH] add archlinux-build.yaml --- .github/workflows/archlinux-build.yaml | 45 +++++++++++++++++++ .../{cmake.yml => debian-build.yaml} | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/archlinux-build.yaml rename .github/workflows/{cmake.yml => debian-build.yaml} (98%) diff --git a/.github/workflows/archlinux-build.yaml b/.github/workflows/archlinux-build.yaml new file mode 100644 index 0000000..b1e1bed --- /dev/null +++ b/.github/workflows/archlinux-build.yaml @@ -0,0 +1,45 @@ +name: Build on archlinux + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + container: + runs-on: ubuntu-latest + container: archlinux:latest + steps: + - name: Run in container + run: | + sed -i /etc/pacman.d/mirrorlist -e "1iServer = https://mirrors.tuna.tsinghua.edu.cn/archlinux/\$repo/os/\$arch" + cat /etc/pacman.d/mirrorlist + pacman-key --init + pacman --noconfirm --noprogressbar -Syu + + - name: Install dep + run: | + pacman -Syu --noconfirm cmake pkgconfig git extra-cmake-modules qt6-base qt6-declarative qt6-wayland + pacman -Syu --noconfirm clang ninja + pacman -Syu --noconfirm fakeroot sudo + + - name: Set up user + run: | + useradd -m githubuser + echo -e "root ALL=(ALL:ALL) ALL\ngithubuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + + - uses: actions/checkout@v3 + with: + submodules: true + - name: Configure CMake + run: | + mkdir -p ${{github.workspace}}/build + cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build \ No newline at end of file diff --git a/.github/workflows/cmake.yml b/.github/workflows/debian-build.yaml similarity index 98% rename from .github/workflows/cmake.yml rename to .github/workflows/debian-build.yaml index 1bfbc38..3f64b2d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/debian-build.yaml @@ -1,4 +1,4 @@ -name: CMake +name: Build on Debian on: push: