Skip to content

Commit

Permalink
Add: skipping actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonyang-ee committed Aug 21, 2023
1 parent 991bb4f commit f46d36e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
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
2 changes: 1 addition & 1 deletion 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 Down

0 comments on commit f46d36e

Please sign in to comment.