Skip to content

Commit

Permalink
Update Action Infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
deltaphi committed Jul 6, 2024
1 parent a973eca commit 7c3707f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 44 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/linuxunittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Linux Unit Testing
on:
push:
branches:
- "*"
- master
pull_request:
branches:
- "*"
Expand All @@ -17,36 +17,37 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/[email protected]
with:
cache: 'pip'
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
pip install -r requirements.txt
- name: Run PlatformIO to fetch libraries for Bluepill
run: |
run: |
cd ${{ github.workspace }}/c6021light
platformio lib -e bluepill install
platformio pkg install -e bluepill
# Runs a single command using the runners shell
- uses: lukka/run-cmake@v2.5
- uses: lukka/run-cmake@v10
with:
cmakeGenerator: UnixMakefiles
cmakeListsOrSettingsJson: CMakeListsTxtBasic
cmakeListsTxtPath: ${{ github.workspace }}/c6021light/CMakeLists.txt
cmakeBuildType: Release
buildDirectory: ${{ runner.temp }}/c6021light/build
buildWithCMake: true
configurePreset: "Linux"
buildPreset: "Linux"

# Actual testing happening
- name: Run Unittest
run: ${{ runner.temp }}/c6021light/build/c6021lightTest
run: ${{ github.workspace }}/../c6021light-build-linux/c6021lightTest
16 changes: 10 additions & 6 deletions .github/workflows/platformio-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,30 @@ name: PlatformIO Bluepill Environment
on:
push:
branches:
- "*"
- master
pull_request:
branches:
- "*"

jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/[email protected]
with:
cache: 'pip'
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
pip install -r requirements.txt
- name: Run PlatformIO for Bluepill
run: platformio run -d ${{ github.workspace }}/c6021light
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/[email protected]
with:
cache: 'pip'
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
pip install -r requirements.txt
- name: Run PlatformIO for Bluepill
run: platformio run -d ${{ github.workspace }}/c6021light
- name: Gather the Release artifacts
shell: bash
shell: bash
run: ${{ github.workspace }}/.github/copy-release-files.sh
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/windowsunittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Windows Unit Testing
on:
push:
branches:
- "*"
- master
pull_request:
branches:
- "*"
Expand All @@ -22,36 +22,35 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/[email protected]
with:
cache: 'pip'
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
pip install -r requirements.txt
- name: Run PlatformIO to fetch libraries for Bluepill
run: |
run: |
cd ${{ github.workspace }}/c6021light
platformio lib -e bluepill install
platformio pkg install -e bluepill
# Runs a single command using the runners shell
- uses: lukka/run-cmake@v2.5
- uses: lukka/run-cmake@v10
with:
cmakeGenerator: VS16Win64
cmakeListsOrSettingsJson: CMakeListsTxtBasic
cmakeListsTxtPath: ${{ github.workspace }}/c6021light/CMakeLists.txt
cmakeBuildType: Release
buildDirectory: ${{ runner.temp }}/c6021light/build
buildWithCMake: true
configurePreset: "Windows"
buildPreset: "Windows"


# Actual testing happening
- name: Examine Output
run: dir ${{ runner.temp }}\c6021light\build\
run: dir ${{ github.workspace }}\..\c6021light-build-windows\

# Actual testing happening
- name: Run Unittest
run: ${{ runner.temp }}\c6021light\build\Release\c6021lightTest.exe
run: ${{ github.workspace }}\..\c6021light-build-windows\Debug\c6021lightTest.exe
30 changes: 30 additions & 0 deletions c6021light/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 6,
"patch": 0
},
"configurePresets": [
{
"name": "Linux",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/../../c6021light-build-linux"
},
{
"name": "Windows",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/../../c6021light-build-windows"
}
],
"buildPresets": [
{
"name": "Linux",
"configurePreset": "Linux"
},
{
"name": "Windows",
"configurePreset": "Windows"
}
]
}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
platformio

0 comments on commit 7c3707f

Please sign in to comment.