Skip to content

Commit 03aa4af

Browse files
authored
Build release target in github workflows (#326)
* add release to build workflow support lto in release mode for arm * update link script locatioon * pre-initialize variable * disable uninitialized warning for rx_driver_package * disable inline of assembly to remove duplicate symbols * add additional newlib nano aliases for getpid and kill for renesas cloud kit * simplify workflow * split debug and release workflow build by matrix
1 parent 4108bd2 commit 03aa4af

File tree

28 files changed

+142
-66
lines changed

28 files changed

+142
-66
lines changed

.github/workflows/ATSAME54-XPRO.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake"
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
3738
cmake --build build

.github/workflows/AZ3166.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/EFR32MG12.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/L475E-IOT01A.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/L4S5I-IOT01A.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m4.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/MIMXRT1050-EVKB.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m7.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m7.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/MIMXRT1060-EVK.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m7.cmake"
37-
cmake --build build
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/arm-gcc-cortex-m7.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
38+
cmake --build build

.github/workflows/RSK-RX65N-2MB.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,7 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/renesas-rx-gcc-rx65n.cmake"
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/renesas-rx-gcc-rx65n.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
3738
cmake --build build

.github/workflows/RX65N-Cloud-Kit.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19+
type: [Debug, Release]
1920

2021
steps:
2122
- name: Checkout code
@@ -31,7 +32,8 @@ jobs:
3132
- name: Install Ninja
3233
uses: seanmiddleditch/gha-setup-ninja@v3
3334

34-
- name: Build project
35+
- name: Build binary
3536
run: |
36-
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/renesas-rx-gcc-rx65n.cmake"
37+
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE="../../cmake/renesas-rx-gcc-rx65n.cmake" -DCMAKE_BUILD_TYPE="${{ matrix.type }}"
3738
cmake --build build
39+

MXChip/AZ3166/app/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
set(LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/startup/MXChip_AZ3166.ld")
5-
64
set(SOURCES
75
startup/system_stm32f4xx.c
86
startup/startup_stm32f412rx.s
@@ -36,10 +34,16 @@ target_include_directories(${PROJECT_NAME}
3634
.
3735
)
3836

37+
target_link_directories(${PROJECT_NAME}
38+
PUBLIC
39+
startup
40+
)
41+
42+
3943
if(CMAKE_C_COMPILER_ID STREQUAL "IAR")
4044
message(FATAL_ERROR, "IAR is not currently implemented for this device")
4145
else()
42-
set_target_linker(${PROJECT_NAME} ${LINKER_SCRIPT})
46+
set_target_linker(${PROJECT_NAME} MXChip_AZ3166.ld)
4347
endif()
4448

4549
post_build(${PROJECT_NAME})

0 commit comments

Comments
 (0)