Skip to content

Commit

Permalink
stop redundant workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 committed Apr 9, 2024
1 parent 73ea431 commit bb8131e
Show file tree
Hide file tree
Showing 49 changed files with 1,538 additions and 51 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/robot-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:

validate:
robot-tests:
runs-on: ubuntu-latest
env:
CMSIS_PACK_ROOT: /home/runner/.cache/arm/packs
Expand Down Expand Up @@ -42,48 +42,55 @@ jobs:
path: /home/runner/.vcpkg

- name: Prepare vcpkg env
working-directory: ./e2e-validation
working-directory: ./test
run: |
. <(curl https://aka.ms/vcpkg-init.sh -L)
vcpkg x-update-registry --all
vcpkg activate
- name: Activate Arm tool license
working-directory: ./e2e-validation
working-directory: ./test
run: |
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
- name: Run Test
working-directory: ./test
run: |
python -m robot --outputdir results testcases/functional_tests
. /home/runner/.vcpkg/vcpkg-init
vcpkg activate
python -m robot --outputdir reports src/test.robot
- name: Run Test and create report
run: python -m robot -d reports -x junit-report.xml "testcases/functional_tests"
# - name: Run Test and create report
# working-directory: ./test
# run: |
# python -m robot -d reports -x junit-report.xml "src/test.robot"

- name: Run Robot Framework tests and generate report
if: always()
run: |
echo "ROBOT_RC=$?" >> "$GITHUB_ENV"
echo "ROBOT_RC=$?" >> "$GITHUB_ENV"
- name: Publish test results
if: always()
uses: actions/upload-artifact@v4
with:
name: reports
path: results
path: ./test/reports

generate_report:
runs-on: ubuntu-latest
needs: robot-tests
steps:
- uses: actions/checkout@v4

- name: Download reports
uses: actions/download-artifact@v4
with:
name: reports
path: reports

- name: Send report to commit
uses: joonvena/robotframework-reporter-action@v2
uses: joonvena/robotframework-reporter-action@v2.4
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}

2 changes: 2 additions & 0 deletions .github/workflows/toolbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
- '**'
- '!docs/**'
- '!README.md'
- '!test/**'
pull_request:
paths:
- '.github/workflows/toolbox.yml'
- '**'
- '!docs/**'
- '!test/**'
release:
types: [published]

Expand Down
14 changes: 0 additions & 14 deletions test/data/MyProject/CM3/MyProject_CM3.cproject.yml

This file was deleted.

20 changes: 0 additions & 20 deletions test/data/MyProject/MyProject.csolution.yml

This file was deleted.

16 changes: 16 additions & 0 deletions test/data/build-asm/project/AC6/AsmArm.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

AREA DATA

IF HEXADECIMAL_TEST != 11259375 ; 0xABCDEF
INFO 1, "HEXADECIMAL_TEST failed!"
ENDIF

IF DECIMAL_TEST != 1234567890
INFO 1, "DECIMAL_TEST failed!"
ENDIF

IF STRING_TEST != "String0"
INFO 1, "STRING_TEST failed!"
ENDIF

END
9 changes: 9 additions & 0 deletions test/data/build-asm/project/AC6/Auto.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

AREA DATA

IF :LNOT::DEF:AUTO_DEF
INFO 1, "AUTO_DEF is not defined!"
ENDIF

END

10 changes: 10 additions & 0 deletions test/data/build-asm/project/AC6/GnuSyntax.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

.syntax unified
.arch armv7-m

.ifndef GAS_DEF
.error "GAS_DEF is not defined!"
.endif

.end

9 changes: 9 additions & 0 deletions test/data/build-asm/project/AC6/PreProcessed.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.syntax unified
.arch armv7-m

#ifndef PRE_PROCESSED_DEF
.error "PRE_PROCESSED_DEF is not defined!"
#endif

.end
9 changes: 9 additions & 0 deletions test/data/build-asm/project/GCC/GAS.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.syntax unified
.arch armv7-m

.ifndef GAS_DEF
.error "GAS_DEF is not defined!"
.endif

.end
13 changes: 13 additions & 0 deletions test/data/build-asm/project/GCC/NonPreProcessed.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.syntax unified
.arch armv7-m

#ifndef PRE_PROCESSED_DEF
.equ SET_ERR_DEF,1
#endif

.ifndef SET_ERR_DEF
.error "SET_ERR_DEF is not defined! It seems this file was preprocessed but it shouldn't!"
.endif

.end
9 changes: 9 additions & 0 deletions test/data/build-asm/project/GCC/PreProcessed.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.syntax unified
.arch armv7-m

#ifndef PRE_PROCESSED_DEF
.error "PRE_PROCESSED_DEF is not defined!"
#endif

.end
15 changes: 15 additions & 0 deletions test/data/build-asm/project/IAR/Asm.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
MODULE ?Asm

#ifndef IAR_ASM_DEF
#error "IAR_ASM_DEF is not defined!"
#endif

EXTERN Reset_Handler_C

PUBWEAK Reset_Handler
SECTION .text:CODE:REORDER:NOROOT(2)
Reset_Handler
LDR R0, =Reset_Handler_C
BX R0

END
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

#include "RTE_Components.h"
#include CMSIS_device_header

int main (void) {
return 1;
int main(void) {
return 0;
}
53 changes: 53 additions & 0 deletions test/data/build-asm/project/project.cproject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
project:

components:
- component: ARM::CMSIS:CORE
- component: ARM::Device:Startup&C Startup

groups:
- group: Source
files:
- file: ./main.c

- group: GCC-CLANG
for-compiler: [GCC, CLANG]
files:
- file: ./GCC/GAS.s
for-compiler: GCC
define:
- GAS_DEF
- file: ./GCC/PreProcessed.S
define:
- PRE_PROCESSED_DEF
- file: ./GCC/NonPreProcessed.s
misc:
- ASM:
- -DPRE_PROCESSED_DEF

- group: AC6
for-compiler: AC6
files:
- file: ./AC6/AsmArm.s
define:
- HEXADECIMAL_TEST: 0xABCDEF
- DECIMAL_TEST: 1234567890
- STRING_TEST: "\"String0\""
- file: ./AC6/GnuSyntax.s
define:
- GAS_DEF
misc:
- ASM:
- -masm=gnu
- file: ./AC6/PreProcessed.S
define:
- PRE_PROCESSED_DEF
- file: ./AC6/Auto.s
define:
- AUTO_DEF

- group: IAR
for-compiler: IAR
files:
- file: ./IAR/Asm.s
define:
- IAR_ASM_DEF
27 changes: 27 additions & 0 deletions test/data/build-asm/solution.csolution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
solution:
created-for: CMSIS-Toolbox@2.2.1
cdefault:

packs:
- pack: ARM::Cortex_DFP
- pack: ARM::CMSIS

target-types:
- type: ARMCM0
device: ARMCM0

build-types:
- type: AC6
compiler: AC6

- type: GCC
compiler: GCC

- type: IAR
compiler: IAR

- type: CLANG
compiler: CLANG

projects:
- project: ./project/project.cproject.yml
6 changes: 6 additions & 0 deletions test/data/build-c/project/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "RTE_Components.h"
#include CMSIS_device_header

int main(void) {
return 0;
}
10 changes: 10 additions & 0 deletions test/data/build-c/project/project.cproject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project:

components:
- component: ARM::CMSIS:CORE
- component: ARM::Device:Startup&C Startup

groups:
- group: Source
files:
- file: ./main.c
31 changes: 31 additions & 0 deletions test/data/build-c/solution.csolution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
solution:
created-for: CMSIS-Toolbox@2.2.1
cdefault:

packs:
- pack: ARM::Cortex_DFP
- pack: ARM::CMSIS

target-types:
- type: ARMCM0
device: ARMCM0

build-types:
- type: AC6
compiler: AC6

- type: GCC
compiler: GCC
misc:
- Library:
- -lm
- -lc

- type: IAR
compiler: IAR

- type: CLANG
compiler: CLANG

projects:
- project: ./project/project.cproject.yml
8 changes: 8 additions & 0 deletions test/data/build-cpp/project/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "RTE_Components.h"
#include CMSIS_device_header
#include <cstddef>

int main(void) {
std::size_t s = 0;
return s;
}
10 changes: 10 additions & 0 deletions test/data/build-cpp/project/project.cproject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project:

components:
- component: ARM::CMSIS:CORE
- component: ARM::Device:Startup&C Startup

groups:
- group: Source
files:
- file: ./main.cpp
Loading

0 comments on commit bb8131e

Please sign in to comment.