diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..ac4a67c9 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,9 @@ +{ + "extends": [ + "config:base", + "schedule:yearly" + ], + "labels": [ + "dependencies" + ] +} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6bfe07ed..3b214994 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,56 +3,52 @@ on: push: branches: - master - - windows-github-actions pull_request: jobs: build-linux: runs-on: ${{ matrix.os }} + continue-on-error: true strategy: + fail-fast: false matrix: - os: [ ubuntu-18.04, ubuntu-20.04 ] + os: [ ubuntu-20.04, ubuntu-22.04 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: "Update dependencies" run: sudo apt-get update - name: "Install dependencies" - run: sudo apt-get install -y build-essential cmake pkg-config qt5-default libqt5opengl5-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev libboost-dev + run: sudo apt-get install -y build-essential cmake pkg-config qtbase5-dev libqt5opengl5-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev libboost-dev - name: "Build" - run: mkdir build && cd build && cmake .. && make + run: make build-macos: runs-on: ${{ matrix.os }} + continue-on-error: true strategy: + fail-fast: false matrix: - os: [ macos-10.15, macos-11 ] + os: [ macos-11, macos-12, macos-13 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: "Install dependencies" - run: brew tap robotology/formulae && brew install qt5 protobuf robotology/formulae/ode + run: brew tap robotology/formulae && brew install cmake pkg-config qt@5 protobuf@21 robotology/formulae/ode - name: "Build" - run: mkdir build && cd build && cmake .. && make - env: - Qt5_DIR: /usr/local/opt/qt5/lib/cmake/Qt5 + run: make build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - - name: make build directory - run: mkdir '${{ github.workspace }}/build/' + - uses: actions/checkout@v4 - name: Install dependencies # saves / restores cache to avoid rebuilding dependencies - uses: lukka/run-vcpkg@v6 + uses: lukka/run-vcpkg@v11 with: - setupOnly: false - vcpkgGitCommitId: 94ce0dab56f4d8ba6bd631ba59ed682b02d45c46 + vcpkgGitCommitId: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50 vcpkgDirectory: c:/vcpkg # folder must reside in c:\ otherwise qt wont install due to long path errors - vcpkgTriplet: x64-windows - vcpkgArguments: qt5 ode protobuf - - name: Run CMake and build - working-directory: ${{ github.workspace }}/build/ - run: | - cmake -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake .. - cmake --build . --config Release + + - name: Run CMake and run vcpkg to build packages + uses: lukka/run-cmake@v10 + with: + configurePreset: "windows-default" + buildPresetAdditionalArgs: "['--config Release']" diff --git a/.gitignore b/.gitignore index c57bddde..2f15451b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ bin*/* *.swp Thumbs.db .idea/* +*.iml cmake-build-debug cmake-build-release diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7c6d1534..00000000 --- a/.travis.yml +++ /dev/null @@ -1,51 +0,0 @@ -language: cpp - - -jobs: - include: - - os: linux - dist: bionic - compiler: clang - - os: linux - dist: bionic - compiler: gcc - - os: linux - dist: focal - compiler: clang - - os: linux - dist: focal - compiler: gcc - - os: osx - osx_image: xcode11.3 - compiler: clang - - os: osx - osx_image: xcode11.3 - compiler: gcc - - -addons: - apt: - packages: - - cmake - - qt5-default - - libqt5opengl5-dev - - libgl1-mesa-dev - - libglu1-mesa-dev - - libprotobuf-dev - - protobuf-compiler - - libode-dev - - libboost-dev - homebrew: - taps: robotology/formulae - packages: - - qt5 - - protobuf - - robotology/formulae/ode - -script: - # grsim - - cd $TRAVIS_BUILD_DIR - - mkdir build && cd build - - cmake .. - - make - - sudo make install diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..019632d5 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,19 @@ +{ + "version": 6, + "configurePresets": [ + { + "name": "windows-default", + "displayName": "Windows x64 Release", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index 47957903..f814175a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -56,11 +56,11 @@ $ sudo pacman -S base-devel boost hicolor-icon-theme \ mesa ode protobuf qt5-base cmake git ``` -#### Debian +#### Ubuntu / Debian For Debian, or derivative ``` -$ sudo apt install git build-essential cmake pkg-config qt5-default \ +sudo apt install git build-essential cmake pkg-config qtbase5-dev \ libqt5opengl5-dev libgl1-mesa-dev libglu1-mesa-dev \ libprotobuf-dev protobuf-compiler libode-dev libboost-dev ``` @@ -79,8 +79,8 @@ brew install cmake brew install pkg-config brew tap robotology/formulae brew install robotology/formulae/ode -brew install qt -brew install protobuf +brew install qt@5 +brew install protobuf@21 ``` If you run into build issues, you may need to run this first: diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f45d8f11..00000000 --- a/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "config:base" - ] -} diff --git a/shippable.yml b/shippable.yml deleted file mode 100644 index 4aae1497..00000000 --- a/shippable.yml +++ /dev/null @@ -1,46 +0,0 @@ -language: none -compiler: - - gcc - -env: - global: - - GRSIM_WS=$HOME/grsim_ws - matrix: - - UBUNTU_DISTRO="trusty" - - UBUNTU_DISTRO="xenial" - -build: - pre_ci_boot: - image_name: ubuntu - image_tag: ${UBUNTU_DISTRO} - pull: true - - ci: - - env # debug - # OS level dependencies - - sudo apt-get update -qq - # libboost-dev is for vartypes - - sudo apt-get install -qq -y git build-essential cmake libqt4-dev libgl1-mesa-dev libglu1-mesa-dev libprotobuf-dev protobuf-compiler libode-dev libboost-dev - - mkdir -p $GRSIM_WS - - ln -s $SHIPPABLE_BUILD_DIR $GRSIM_WS/grSim - # Compile vartypes - - cd $GRSIM_WS - - git clone https://github.com/szi/vartypes.git - - cd vartypes - - mkdir build && cd build - - cmake .. - - make - - sudo make install - # compile grSim - - cd $GRSIM_WS/grSim - - mkdir build && cd build - - cmake .. - - make - - sudo make install - -integrations: - notifications: - - integrationName: email - type: email - on_success: change - on_failure: always diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..d82168ff --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "grsim", + "version-string": "0.0.1", + "dependencies": [ + "qt5", + "ode", + "protobuf" + ] +} \ No newline at end of file