Skip to content

Commit

Permalink
move build directory outside of repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Jul 14, 2023
1 parent 9847cde commit 184932e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/github-cxx-qt-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
qml-module-qtquick-controls2
qml-module-qttest
workspace: /home/runner/cxx-qt
build_dir: /home/runner/cxx-qt/build
- name: Ubuntu 22.04 (gcc) Qt6
os: ubuntu-22.04
qt_version: 6
Expand All @@ -54,6 +55,7 @@ jobs:
libvulkan-dev
libxkbcommon-dev
workspace: /home/runner/cxx-qt
build_dir: /home/runner/cxx-qt/build

- name: macOS 11 (clang) Qt5
os: macos-11
Expand All @@ -70,6 +72,7 @@ jobs:
compiler_cache_path: /Users/runner/Library/Caches/Mozilla.sccache
cargo_dir: ~/.cargo
workspace: /Users/runner/cxx-qt
build_dir: /Users/runner/cxx-qt/build
cc: clang
cxx: clang++
- name: macOS 11 (clang) Qt6
Expand All @@ -82,6 +85,7 @@ jobs:
compiler_cache_path: /Users/runner/Library/Caches/Mozilla.sccache
cargo_dir: ~/.cargo
workspace: /Users/runner/cxx-qt
build_dir: /Users/runner/cxx-qt/build
cc: clang
cxx: clang++

Expand All @@ -97,6 +101,7 @@ jobs:
cxx: cl
# The D drive runs out of space when building dependencies with vcpkg.
workspace: C:\cxx-qt
build_dir: C:\build
- name: Windows 2022 (MSVC) Qt6
os: windows-2022
qt_version: 6
Expand All @@ -109,6 +114,7 @@ jobs:
cxx: cl
# The D drive runs out of space when building dependencies with vcpkg.
workspace: C:\cxx-qt
build_dir: C:\build

runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
Expand Down Expand Up @@ -206,7 +212,7 @@ jobs:
-D USE_QT5=${{ matrix.qt_version == 5 }}
-D CMAKE_BUILD_TYPE=Release
-G Ninja
-S . -B build
-S . -B ${{ matrix.build_dir }}
--log-level=DEBUG
working-directory: ${{ matrix.workspace }}
env:
Expand All @@ -215,13 +221,13 @@ jobs:
CXX: ${{ matrix.cxx }}

- name: "Build"
run: cmake --build build --config Release --parallel 2
run: cmake --build ${{ matrix.build_dir }} --config Release --parallel 2
working-directory: ${{ matrix.workspace }}
env:
RUSTC_WRAPPER: sccache
- name: "Test"
run: ctest ${{ matrix.ctest_args }} -C Release -T test --output-on-failure --parallel 2
working-directory: ${{ matrix.workspace }}/build
working-directory: ${{ matrix.build_dir }}
env:
RUSTC_WRAPPER: sccache
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ add_test(NAME cargo_fmt COMMAND cargo fmt --all --check WORKING_DIRECTORY ${CMAK

set_tests_properties(cargo_tests cargo_doc_tests cargo_clippy cargo_fmt PROPERTIES
ENVIRONMENT_MODIFICATION "${CARGO_ENV}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
set_tests_properties(cargo_doc PROPERTIES
ENVIRONMENT_MODIFICATION "${CARGO_ENV};RUSTDOCFLAGS=set:--deny=warnings"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)

# Ensure test inputs and outputs are formatted
Expand Down

0 comments on commit 184932e

Please sign in to comment.