Skip to content
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

Action #13

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ on:
- '**.md'

jobs:
github-build:
Skip_Checking:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5

Github-Build:
runs-on: ubuntu-latest
needs: Skip_Checking
if: needs.Skip_Checking.outputs.should_skip != 'true'
steps:
- name: Install Dependencies
run: |
Expand All @@ -36,26 +46,32 @@ jobs:
- name: Build
run: cmake --build $GITHUB_WORKSPACE/build -j 10

alpine-build:
Alpine-Build:
runs-on: ubuntu-latest
needs: Skip_Checking
if: needs.Skip_Checking.outputs.should_skip != 'true'
container:
image: "ghcr.io/jasonyang-ee/stm32-builder:alpine-latest"
steps:
- uses: actions/checkout@v3
- name: BUILD
run: build.sh

arch-build:
Arch-Build:
runs-on: ubuntu-latest
needs: Skip_Checking
if: needs.Skip_Checking.outputs.should_skip != 'true'
container:
image: "ghcr.io/jasonyang-ee/stm32-builder:arch-latest"
steps:
- uses: actions/checkout@v3
- name: BUILD
run: build.sh

ubuntu-build-upload:
Ubuntu-Build-Upload:
runs-on: ubuntu-latest
needs: Skip_Checking
if: needs.Skip_Checking.outputs.should_skip != 'true'
container:
image: "ghcr.io/jasonyang-ee/stm32-builder:ubuntu-latest"
steps:
Expand All @@ -76,16 +92,18 @@ jobs:
path: ${{ github.workspace }}/build/*.bin

Result:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- github-build
- arch-build
- alpine-build
- ubuntu-build-upload
- Skip_Checking
if: always() && needs.Skip_Checking.outputs.should_skip != 'true'
steps:
- name: All tests ok
- name: All Tests Ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
- name: Some Tests Failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"serve",
"--open",
"--port",
"8000"
"8500"
],
"options": {
"cwd": "${workspaceFolder}"
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.22)
# Setup cmake module path and compiler settings
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
message("Build type: " ${CMAKE_BUILD_TYPE})
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
set(CMAKE_CXX_STANDARD 17)
Expand All @@ -27,6 +27,7 @@ set(EXECUTABLE ${CMAKE_PROJECT_NAME})

# USE .\getIncludeList.sh and .\getSourceList.sh to generate file list
# Include List, Source List, and MCU Sepecific Setting
# Must Update these files in cmake/ when adding new source files
include(STM32G431xx_HAL_PARA)
include(SourceList)
include(IncludeList)
Expand All @@ -46,7 +47,6 @@ target_compile_options(${EXECUTABLE} PRIVATE
-Wall
-Wpedantic
-Wno-unused-parameter
-Os # Optimize for size (that uses O2 )
)

# Linker options
Expand Down
Loading