Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Dec 19, 2022
2 parents f22b92e + c3684ab commit 79f86a7
Show file tree
Hide file tree
Showing 313 changed files with 8,345 additions and 3,014 deletions.
10 changes: 10 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Spell Check Commits
90a99e8dc09f01baa594ab37c41b5d7a34c9bb72
78516ad9dc5317577c0cf3fe09762c2a4f3908e7

# Coding Style Commits
54231b9e43b751b2ccfb906a73510230364509be
97268eee7680d962d2c6d532a19b4b6713771be7
302745184fd96ed8a587c4310316c5f41d2e9d79
e2f8736b4f08530a082fbf40db966a6d37b569d7
95c5c8c2d5a87269acd963aae7402e2b835580f1
104 changes: 44 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,82 +11,66 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [Esp8266, Host, Esp32, Rp2040]
variant: [""]
os: [ubuntu-latest, windows-latest]
os: [ubuntu-20.04, windows-latest]
variant: [esp8266, host, esp32, esp32s2, esp32c3, rp2040]
include:
- arch: Esp32
variant: esp32s2
os: ubuntu-latest
- arch: Esp32
variant: esp32s2
os: windows-latest
- arch: Esp32
variant: esp32c3
os: ubuntu-latest
- arch: Esp32
variant: esp32c3
os: windows-latest
exclude:
- os: windows-latest
arch: Host

continue-on-error: ${{ matrix.arch == 'Host' && matrix.os == 'windows-latest' }}

- variant: esp8266
arch: Esp8266
- variant: host
arch: Host
- variant: esp32
arch: Esp32
- variant: esp32s2
arch: Esp32
- variant: esp32c3
arch: Esp32
- variant: rp2040
arch: Rp2040

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJson(matrix) }}
cancel-in-progress: true

runs-on: ${{ matrix.os }}

steps:
- name: Fix autocrlf setting
run: |
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v2
- name: Setup SMING_HOME for Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/checkout@v3

- name: Configure environment
shell: pwsh
run: |
echo "CI_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "SMING_HOME=$GITHUB_WORKSPACE/Sming" >> $GITHUB_ENV
- name: Setup SMING_HOME for Windows
if: ${{ matrix.os == 'windows-latest' }}
"CI_BUILD_DIR=" + (Resolve-Path ".").path >> $env:GITHUB_ENV
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
"SMING_ARCH=${{ matrix.arch }}" >> $env:GITHUB_ENV
"SMING_SOC=${{ matrix.variant }}" >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
echo ("CI_BUILD_DIR=" + $env:GITHUB_WORKSPACE) >> $env:GITHUB_ENV
$env:SMING_HOME = Join-Path $env:GITHUB_WORKSPACE "Sming"
echo ("SMING_HOME=" + $env:SMING_HOME) >> $env:GITHUB_ENV
- name: Install Sming Framework on Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
SMING_ARCH: ${{matrix.arch}}
SMING_SOC: ${{matrix.variant}}
run: |
./Tools/install.sh $(echo "$SMING_ARCH" | tr '[:upper:]' '[:lower:]')
- name: Install Sming Framework on Windows
Tools/ci/install.sh
- name: Install build tools for Windows
if: ${{ matrix.os == 'windows-latest' }}
env:
SMING_ARCH: ${{matrix.arch}}
SMING_SOC: ${{matrix.variant}}
run: |
Tools/ci/setenv.ps1
Tools/install.cmd "$env:SMING_ARCH".ToLower()
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build and Test for ${{matrix.arch}} on Ubuntu
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
- name: Build and test for ${{matrix.arch}} on Ubuntu
env:
SMING_ARCH: ${{matrix.arch}}
SMING_SOC: ${{matrix.variant}}
CLANG_FORMAT: clang-format-8
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
source $SMING_HOME/../Tools/export.sh
$CLANG_FORMAT --version
./Tools/ci/build.sh
- name: Build and Test for ${{matrix.arch}} on Windows
env:
SMING_ARCH: ${{matrix.arch}}
SMING_SOC: ${{matrix.variant}}
if: ${{ matrix.os == 'windows-latest' }}
Tools/ci/build.sh
- name: Build and test for ${{matrix.arch}} on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
$env:PYTHON_PATH=$(python -c "import sys, os.path; print(os.path.dirname(sys.executable))")
Tools/ci/setenv.ps1
. Tools/ci/setenv.ps1
Tools/ci/build.cmd
17 changes: 9 additions & 8 deletions .github/workflows/coverity-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
# concurrency:
# group: ${{ github.head_ref || github.run_id }}
# cancel-in-progress: true
runs-on: ubuntu-latest

runs-on: ubuntu-20.04

steps:
- name: Checkout code
Expand All @@ -40,31 +40,32 @@ jobs:
fi
fi
fi
echo "CHECK_SCA=$CHECK_SCA" >> $GITHUB_ENV
- name: Setup SMING_HOME for Ubuntu
if: ${{ env.CHECK_SCA == 1 }}
run: |
echo "CI_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "SMING_HOME=$GITHUB_WORKSPACE/Sming" >> $GITHUB_ENV
echo "SMING_ARCH=Host" >> $GITHUB_ENV
- name: Install Sming Framework on Ubuntu
if: ${{ env.CHECK_SCA == 1 }}
run: |
./Tools/install.sh $(echo "$SMING_ARCH" | tr '[:upper:]' '[:lower:]')
- name: Install Ninja
if: ${{ env.CHECK_SCA == 1 }}
uses: seanmiddleditch/gha-setup-ninja@master
Tools/ci/install.sh
- name: Run Coverity Scan
if: ${{ env.CHECK_SCA == 1 }}
env:
env:
COVERITY_SCAN_TOKEN: ${{secrets.COVERITY_SCAN_TOKEN}}
run: |
source $SMING_HOME/../Tools/export.sh
export MAKE_PARALLEL="make -j$(nproc)"
export COVERITY_SCAN_BUILD_COMMAND_PREPEND="cd $SMING_HOME"
cat > /tmp/secrets.sh
$SMING_HOME/Arch/Host/Tools/ci/coverity-scan.sh
- name: Archive scan log
if: ${{ env.CHECK_SCA == 1 }}
uses: actions/upload-artifact@v3
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Continuous Integration (CI)

on:
workflow_call:
inputs:
sming_repo:
description: 'Full URL for Sming repository'
default: 'https://github.com/SmingHub/Sming'
type: string
sming_branch:
description: 'Sming branch to run against'
default: 'develop'
type: string
alias:
description: 'Library alias'
default: ''
type: string

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
variant: [esp8266, host, esp32, esp32s2, esp32c3, rp2040]
include:
- variant: esp8266
arch: Esp8266
- variant: host
arch: Host
- variant: esp32
arch: Esp32
- variant: esp32s2
arch: Esp32
- variant: esp32c3
arch: Esp32
- variant: rp2040
arch: Rp2040

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJson(matrix) }}
cancel-in-progress: true

runs-on: ${{ matrix.os }}

steps:
- name: Fix autocrlf setting
run: |
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3

- name: Create library alias
if: ${{ inputs.alias }}
shell: pwsh
run: |
New-Item -ItemType SymbolicLink -Path "../${{ inputs.alias }}" -Target (Resolve-Path ".").path
- name: Checkout sming
run: |
git clone ${{ inputs.sming_repo }} -b ${{ inputs.sming_branch }} --depth 1 ../../sming
- name: Configure environment
shell: pwsh
run: |
"SMING_HOME=" + (Resolve-Path "../../sming/Sming").path >> $env:GITHUB_ENV
"COMPONENT_SEARCH_DIRS=" + (Resolve-Path "..").path >> $env:GITHUB_ENV
"CI_MAKEFILE=" + (Resolve-Path "../../sming/Tools/ci/library/Makefile") >> $env:GITHUB_ENV
"SMING_ARCH=${{ matrix.arch }}" >> $env:GITHUB_ENV
"SMING_SOC=${{ matrix.variant }}" >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
. $SMING_HOME/../Tools/export.sh
$SMING_HOME/../Tools/ci/install.sh $SMING_ARCH
- name: Install build tools for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
. "$env:SMING_HOME/../Tools/ci/setenv.ps1"
. "$env:SMING_HOME/../Tools/ci/install.cmd"
- name: Build and Test for ${{matrix.arch}} on Ubuntu
env:
CLANG_FORMAT: clang-format-8
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
. $SMING_HOME/../Tools/export.sh
make -j$(nproc) -f $CI_MAKEFILE
- name: Build and Test for ${{matrix.arch}} on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
. "$env:SMING_HOME/../Tools/ci/setenv.ps1"
make -j $env:NUMBER_OF_PROCESSORS -f $env:CI_MAKEFILE
18 changes: 18 additions & 0 deletions .github/workflows/library/ci-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI Dispatch

on:
workflow_dispatch:
inputs:
sming_repo:
description: 'Full URL for Sming repository'
default: 'https://github.com/SmingHub/Sming'
sming_branch:
description: 'Sming branch to run against'
default: 'develop'

jobs:
build:
uses: SmingHub/Sming/.github/workflows/library.yml@develop
with:
sming_repo: ${{ inputs.sming_repo }}
sming_branch: ${{ inputs.sming_branch }}
7 changes: 7 additions & 0 deletions .github/workflows/library/ci-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: CI Push

on: [push]

jobs:
build:
uses: SmingHub/Sming/.github/workflows/library.yml@develop
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
SMING_ARCH: Host
RELEASE_TOKEN: ${{secrets.RELEASE_TOKEN}}
CI_REPO_NAME: ${{github.repository}}
CHOCO_TOKEN: ${{secrets.CHOKO_TOKEN}}
CHOCO_TOKEN: ${{secrets.CHOCO_TOKEN}}
run: |
export CI_BUILD_DIR="$GITHUB_WORKSPACE"
export SMING_HOME="$GITHUB_WORKSPACE/Sming"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spelling-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Check spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: false
- name: Get submodules
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ nbproject
GTAGS
GRTAGS
GPATH
.DS_Store

# Tag files created by build system
.submodule
Expand Down
Loading

0 comments on commit 79f86a7

Please sign in to comment.