From d9ac2ab3aa08bab677cd9876c0e3096b1d18a215 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Tue, 3 May 2022 02:29:28 +0200 Subject: [PATCH 1/2] Bump clang version --- .github/workflows/build-release.yml | 2 +- .github/workflows/ci.yml | 2 +- azure-pipelines.yml | 2 +- docs/development/Building in Ubuntu.md | 11 +++++------ src/test/Makefile | 12 ++++++------ 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index e253cca1c1..9e777bf135 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -14,7 +14,7 @@ jobs: release: name: Release needs: ci - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Code Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e4bfaa6eb..d0ab006471 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Code Checkout uses: actions/checkout@v2 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d1738bcb8..fbdf56f72c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,7 +16,7 @@ variables: owner: betaflight repoName: betaflight-pull-requests releaseNotes: This is a build of a community provided pull request. It may be unstable and result in corrupted configurations or data loss. **Use only for testing.** - vmImage: 'ubuntu-20.04' + vmImage: 'ubuntu-22.04' name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID) diff --git a/docs/development/Building in Ubuntu.md b/docs/development/Building in Ubuntu.md index 3bc2657cf2..cec9d9c0d7 100644 --- a/docs/development/Building in Ubuntu.md +++ b/docs/development/Building in Ubuntu.md @@ -1,7 +1,7 @@ # Building in Ubuntu Building for Ubuntu platform is remarkably easy. -This document is tested and based on the latest Ubuntu 20.04.03 LTS release and can also be used for WSL(2). +This document is tested and based on the latest Ubuntu 22.04 LTS release and can also be used for WSL(2). ### Clone betaflight repository and install toolchain @@ -16,8 +16,7 @@ This document is tested and based on the latest Ubuntu 20.04.03 LTS release and Navigate to your local betaflight repository and use the following steps to pull the latest changes and rebuild your version of betaflight: $ git pull - $ make clean TARGET=MATEKF405 - $ make TARGET=MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG] + $ make MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG] Using the optional OPTIONS parameters you can specify options like RANGEFINDER. Using the optional DEBUG parameter you can specify the debugger. @@ -31,13 +30,13 @@ Make sure to remove `obj/` and `make clean`, before building again. $ sudo apt update && apt upgrade $ sudo apt install libatomic1 npm $ sudo npm install -g gulp-cli yarn - $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh + $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash $ source ~/.bashrc - $ nvm install v14.18.2 (for exact version please check link below) + $ nvm install v16.15.1 (for exact version please check link below) See [Betaflight Configurator Development](https://github.com/betaflight/betaflight-configurator#development) for how to build the Betaflight Configurator. -### Flashing a target with Betaflight Configurator on Ubuntu 20.04 +### Flashing a target with Betaflight Configurator on Ubuntu 22.04 In most Linux distributions the user won't have access to serial interfaces by default. Flashing a target requires configuration of usb for dfu mode. To add this access right type the following command in a terminal: diff --git a/src/test/Makefile b/src/test/Makefile index e8e77ac86a..622f5b721d 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -461,8 +461,8 @@ GTEST_DIR = ../../lib/test/gtest # Use clang/clang++ by default -CC := clang-10 -CXX := clang++-10 +CC := clang-12 +CXX := clang++-12 ifeq ($(shell which $(CC) 2>/dev/null),) $(info Falling back to 'clang'.) CC := clang @@ -472,7 +472,7 @@ endif #CC := gcc #CXX := g++ -# These flags are needed for clang 10 (linux / MacOS) to make test work: +# These flags are needed for clang > 10 (linux / MacOS) to make test work: # -Wno-c99-extensions # -Wno-reorder @@ -495,11 +495,11 @@ CXX_VERSION = $(shell $(CXX) -dumpversion) ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang) -# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 13 } +# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 14 } # Travis reports CC_VERSION of 4.2.1 CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION))) CC_VERSION_CHECK_MIN := 7 -CC_VERSION_CHECK_MAX := 13 +CC_VERSION_CHECK_MAX := 14 # Added flags for clang 11 - 13 are not backwards compatible ifeq ($(shell expr $(CC_VERSION_MAJOR) \> 10 \& $(CC_VERSION_MAJOR) \< 14), 1) @@ -509,7 +509,7 @@ COMMON_FLAGS += \ endif ifeq ($(shell expr $(CC_VERSION_MAJOR) \< $(CC_VERSION_CHECK_MIN) \| $(CC_VERSION_MAJOR) \> $(CC_VERSION_CHECK_MAX)),1) -$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-10'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).) +$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-12'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).) endif COMMON_FLAGS += -fblocks From c2ed48a6427cd97b1112a101841aa4e44f3a121a Mon Sep 17 00:00:00 2001 From: J Blackman Date: Mon, 11 Jul 2022 09:55:41 +1000 Subject: [PATCH 2/2] Update ci.yml Moving all distributions to 22.04 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b176cbe31f..80414d3e20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ on: jobs: setup: name: Setup - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 outputs: targets: ${{ steps.get-targets.outputs.targets }} steps: @@ -71,7 +71,7 @@ jobs: test: name: Test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -88,7 +88,7 @@ jobs: name: Complete needs: [build, test] if: ${{ always() }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check build matrix result if: ${{ needs.build.result != 'success' }}