From 7fc4ab3f5fb3f4f3c534470099ff7d438bbdcdfc Mon Sep 17 00:00:00 2001 From: insunaa Date: Mon, 21 Aug 2023 14:52:09 +0200 Subject: [PATCH] test ci workflow change --- .github/workflows/ubuntu.yml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 739e639815a..f4a2ce3463d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -25,18 +25,44 @@ jobs: COMPILER_PP: g++-12 USE_PCH: ON EXTRA_BUILD: "" + PREPARE_COMMAND: "cmake -E make_directory ${{ env.BUILD_DIR }}" + CONFIGURE_COMMAND: "cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=/home/runner/work ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}" + BUILD_INSTALL_COMMAND: | + cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} + cmake --install ${{env.BUILD_DIR}} - os: ubuntu-22.04 COMPILER_CC: clang COMPILER_PP: clang++ USE_PCH: ON EXTRA_BUILD: "-DBUILD_EXTRACTORS=ON -DBUILD_AHBOT=ON -DBUILD_PLAYERBOT=ON " + PREPARE_COMMAND: "cmake -E make_directory ${{ env.BUILD_DIR }}" + CONFIGURE_COMMAND: "cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=/home/runner/work ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}" + BUILD_INSTALL_COMMAND: | + cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} + cmake --install ${{env.BUILD_DIR}} - os: ubuntu-22.04 COMPILER_CC: clang COMPILER_PP: clang++ USE_PCH: OFF EXTRA_BUILD: "" + PREPARE_COMMAND: "cmake -E make_directory ${{ env.BUILD_DIR }}" + CONFIGURE_COMMAND: "cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=/home/runner/work ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}" + BUILD_INSTALL_COMMAND: | + cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} + cmake --install ${{env.BUILD_DIR}} + + - os: ubuntu-22.04 + COMPILER_CC: clang + COMPILER_PP: clang++ + USE_PCH: ON + EXTRA_BUILD: "" + PREPARE_COMMAND: "" + CONFIGURE_COMMAND: "CC=clang CXX=clang++ meson setup ${{env.REPO_DIR}} ${{env.BUILD_DIR}}" + BUILD_INSTALL_COMMAND: | + meson configure ${{env.BUILD_DIR}} -Dprefix=/home/runner/work + ninja -C ${{env.BUILD_DIR}} install steps: - name: Checkout @@ -50,7 +76,7 @@ jobs: echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD).zip" >> $GITHUB_ENV echo "CC=${{matrix.COMPILER_CC}}" >> $GITHUB_ENV echo "CXX=${{matrix.COMPILER_PP}}" >> $GITHUB_ENV - cmake -E make_directory ${{ env.BUILD_DIR }} + ${{ matrix.PREPARE_COMMAND }} - name: Cache Windows boost uses: actions/cache@v2 @@ -82,14 +108,12 @@ jobs: USE_PCH: ${{ matrix.USE_PCH }} EXTRA_BUILD: ${{ matrix.EXTRA_BUILD }} BOOST_ROOT: "${{env.BOOST_INSTALL_DIR}}/boost/boost" - run: cmake -DBoost_ARCHITECTURE=-x64 -DPCH=${{env.USE_PCH}} -DCMAKE_INSTALL_PREFIX=/home/runner/work ${{env.EXTRA_BUILD}}-B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}} + run: ${{ matrix.CONFIGURE_COMMAND }} - name: Build env: MAKEFLAGS: "-j8" - run: | - cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} - cmake --install ${{env.BUILD_DIR}} + run: ${{ matrix.BUILD_INSTALL_COMMAND }} notify: name: Discord Notification @@ -122,3 +146,4 @@ jobs: footer: Next time ${{github.event.pusher.name}}! webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png +