Skip to content

CMake: Fix travis using tools #13311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Jul 20, 2020

Summary of changes

Travis broke with the recent commits, we shall use mbed-tools from now on to export cmake and build.

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[x] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@0xc0170 0xc0170 requested a review from a team July 20, 2020 09:28
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 20, 2020

For anyone watching this branch, please use the commands to build blinky (other examples will be fixed).

mbedtools configure -t GCC_ARM -m K64F
cd build && cmake .. -GNinja -DMBED_PROFILE=develop && ninja

@0xc0170 0xc0170 force-pushed the fix_travis_using_tools branch from a856e61 to bbd66a5 Compare July 20, 2020 09:36
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 20, 2020

Syntax error, fixed

@hugueskamba
Copy link
Collaborator

I tried to build Blinky as specified in the script but I got the following error:

user at hostname in /path/to/mbed-os-example-blinky on feature-cmake
$ mbedtools configure -t GCC_ARM -m K64F
mbed_config.cmake has been generated and written to '/path/to/mbed-os-example-blinky/.mbedbuild'
user at hostname in /path/to/mbed-os-example-blinky on feature-cmake
$ cd build/
user at hostname in /path/to/mbed-os-example-blinky/build on feature-cmake
$ cmake .. -GNinja -DMBED_PROFILE=develop
CMake Error at mbed-os/cmake/app.cmake:84 (add_custom_command):
  add_custom_command called with wrong number of arguments.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)
CMake Error at mbed-os/cmake/app.cmake:85 (add_custom_command):
  add_custom_command called with wrong number of arguments.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)
-- Configuring incomplete, errors occurred!
See also "/path/to/mbed-os-example-blinky/build/CMakeFiles/CMakeOutput.log".
See also "/path/to/mbed-os-example-blinky/build/CMakeFiles/CMakeError.log".

@rwalton-arm
Copy link
Contributor

I tried to build Blinky as specified in the script but I got the following error:

user at hostname in /path/to/mbed-os-example-blinky on feature-cmake
$ mbedtools configure -t GCC_ARM -m K64F
mbed_config.cmake has been generated and written to '/path/to/mbed-os-example-blinky/.mbedbuild'
user at hostname in /path/to/mbed-os-example-blinky on feature-cmake
$ cd build/
user at hostname in /path/to/mbed-os-example-blinky/build on feature-cmake
$ cmake .. -GNinja -DMBED_PROFILE=develop
CMake Error at mbed-os/cmake/app.cmake:84 (add_custom_command):
  add_custom_command called with wrong number of arguments.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)
CMake Error at mbed-os/cmake/app.cmake:85 (add_custom_command):
  add_custom_command called with wrong number of arguments.
Call Stack (most recent call first):
  CMakeLists.txt:10 (include)
-- Configuring incomplete, errors occurred!
See also "/path/to/mbed-os-example-blinky/build/CMakeFiles/CMakeOutput.log".
See also "/path/to/mbed-os-example-blinky/build/CMakeFiles/CMakeError.log".

The tools config doesn't touch add_custom_command - are your mbed-os and example-blinky up to date?

@@ -113,13 +113,15 @@ matrix:
- source_pkg gcc
- arm-none-eabi-gcc --version
- pip install --user --upgrade cmake
- pip install --user --upgrade mbed-tools
- >-
git clone --depth=1 --single-branch --branch feature-cmake https://github.com/ARMmbed/mbed-os-example-blinky.git;
cd mbed-os-example-blinky;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add .mbed file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just about to add it. can we fix the tool or we fix it here for now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest we fix it here for now until we can all discuss what we want to do in the tools going forward (perhaps on Wednesday when @Patater returns from holiday).

@hugueskamba
Copy link
Collaborator

hugueskamba commented Jul 20, 2020

The tools config doesn't touch add_custom_command - are your mbed-os and example-blinky up to date?

@rwalton-arm Yes, I fetched and pulled this morning. There are custom commands in cmake/app.cmake.

@rwalton-arm
Copy link
Contributor

The tools config doesn't touch add_custom_command - are your mbed-os and example-blinky up to date?

@rwalton-arm Yes, I fetched and pulled this morning. There are custom commands in cmake/app.cmake.

Yeah but I don't think the generated config affects them. Did you pull after #13286 was merged?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 20, 2020

I added .mbed creation as we manually fetch mbed-os for now

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 20, 2020

@rwalton-arm @hugueskamba Please review

@0xc0170 0xc0170 force-pushed the fix_travis_using_tools branch from 2aaa04c to d3914c4 Compare July 20, 2020 10:52
@mergify mergify bot added needs: work and removed needs: CI labels Jul 20, 2020
@ciarmcom ciarmcom requested a review from a team July 20, 2020 11:00
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

.travis.yml Outdated
mkdir -p build;
script:
- cd build && cmake .. -GNinja && ninja
- cd build && cmake .. -GNinja -DMBED_PROFILE=develop && ninja
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- cd build && cmake .. -GNinja -DMBED_PROFILE=develop && ninja
- cd build && cmake .. -GNinja -DMBED_PROFILE=develop && cmake --build .

This command is a generic, cross-platform wrapper to the native build command for the chosen generator, ninja in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

We need config generation as part of the export, thus need to use tools from now on.
Blinky was already updated.
@0xc0170 0xc0170 force-pushed the fix_travis_using_tools branch from 0d1b602 to b9d9b01 Compare July 20, 2020 11:25
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 20, 2020

rebased, if this fails with only file missing, I'll merge to feature-branch, another PR incoming to fix this error

@mergify mergify bot added needs: work and removed needs: CI labels Jul 20, 2020
@0xc0170 0xc0170 merged commit d863054 into ARMmbed:feature-cmake Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants