Skip to content

Commit

Permalink
Update CI build to ubuntu-latest (22.04) (#2735)
Browse files Browse the repository at this point in the history
Use ubuntu-latest (22.04) for CI

**Add repo for clang**

Keep using clang-8

**Use default gcc (11)**

Was gcc 9

**Fix FatIFS library test failure**

exfat-utils has moved to exfatprogs
kernel contains exfat support, but requires linux-modules-extra-azure
Recent versions of fsck.vfat require volume label matches boot sector

**Explicitly use python 3.12 for CI**

Default is python 3.8 which is a bit old.
ESP32 IDF 4.3/4.4 breaks with later versions but a sensible default is 3.12.
  • Loading branch information
mikee47 authored Mar 18, 2024
1 parent 4152413 commit 1054a0c
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 25 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci-esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-latest, windows-latest]
variant: [esp32, esp32s2, esp32c3, esp32s3, esp32c2]
idf_version: ["4.3", "4.4", "5.0", "5.2"]
exclude:
Expand Down Expand Up @@ -39,7 +39,12 @@ jobs:
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.idf_version == '4.3' && '3.8' || '3.12' }}

- name: Configure environment
shell: pwsh
Expand All @@ -48,7 +53,7 @@ jobs:
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
Tools/ci/install.sh
Expand All @@ -59,7 +64,7 @@ jobs:
Tools/ci/install.cmd
- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
source $SMING_HOME/../Tools/export.sh
Tools/ci/build.sh
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-latest, windows-latest]
variant: [esp8266, host, rp2040]
include:
- variant: esp8266
Expand All @@ -37,7 +37,12 @@ jobs:
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Configure environment
shell: pwsh
Expand All @@ -46,7 +51,7 @@ jobs:
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
Tools/ci/install.sh
Expand All @@ -57,9 +62,9 @@ jobs:
Tools/ci/install.cmd
- name: Build and test for ${{matrix.variant}} on Ubuntu
env:
env:
CLANG_FORMAT: clang-format-8
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
source $SMING_HOME/../Tools/export.sh
$CLANG_FORMAT --version
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-latest, windows-latest]
variant: [esp8266, host, esp32, esp32s2, esp32c3, rp2040]
include:
- variant: esp8266
Expand Down Expand Up @@ -49,7 +49,12 @@ jobs:
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Create library alias
if: ${{ inputs.alias }}
Expand All @@ -71,23 +76,23 @@ jobs:
"SMING_SOC=${{ matrix.variant }}" >> $env:GITHUB_ENV
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
. $SMING_HOME/../Tools/export.sh
$SMING_HOME/../Tools/ci/install.sh $SMING_ARCH
$SMING_HOME/../Tools/ci/install.sh
- 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"
cd $env:SMING_HOME/..
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
- name: Build and Test for ${{matrix.arch}} on Ubuntu
env:
CLANG_FORMAT: clang-format-8
if: ${{ matrix.os == 'ubuntu-20.04' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
. $SMING_HOME/../Tools/export.sh
source $SMING_HOME/../Tools/export.sh
make -j$(nproc) -f $CI_MAKEFILE
- name: Build and Test for ${{matrix.arch}} on Windows
Expand Down
2 changes: 1 addition & 1 deletion Sming/Libraries/FatIFS
10 changes: 5 additions & 5 deletions Tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ fi

if [ -n "$APPVEYOR" ] || [ -n "$GITHUB_ACTION" ]; then

# Provide repo. for clang-format-8 on Ubuntu 22.04
sudo apt-add-repository -y 'deb http://mirrors.kernel.org/ubuntu focal main universe'
sudo apt-get -y update
$PKG_INSTALL \
clang-format-8 \
g++-9-multilib \
g++-multilib \
python3-setuptools \
ninja-build \
exfat-fuse \
exfat-utils \
linux-modules-extra-azure \
exfatprogs \
$EXTRA_PACKAGES

sudo update-alternatives --set gcc /usr/bin/gcc-9

else

MACHINE_PACKAGES=""
Expand Down

0 comments on commit 1054a0c

Please sign in to comment.