ci(test-docker-container): test new docker container

This commit is contained in:
ZanzyTHEbar 2023-03-12 00:39:18 +00:00
parent 0d1f7ada53
commit 2463aac8c8

View File

@ -21,44 +21,44 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Cache pip #- name: Cache pip
uses: actions/cache@v3 # uses: actions/cache@v3
with: # with:
path: ~/.cache/pip # path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} # key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip- # restore-keys: ${{ runner.os }}-pip-
- name: Cache PlatformIO #- name: Cache PlatformIO
uses: actions/cache@v3 # uses: actions/cache@v3
with: # with:
path: ~/.platformio # path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} # key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-pio- # ${{ runner.os }}-pio-
- name: Setup Python install #- name: Setup Python install
uses: actions/setup-python@v4 # uses: actions/setup-python@v4
with: # with:
python-version: "3.x" # python-version: "3.x"
- name: Install PlatformIO with Pip #- name: Install PlatformIO with Pip
run: | # run: |
#
python -m pip install --upgrade pip # python -m pip install --upgrade pip
pip install distro # pip install distro
pip install --upgrade platformio # pip install --upgrade platformio
pio upgrade --dev # pio upgrade --dev
pio pkg update --global # pio pkg update --global
- name: Update build command #- name: Update build command
working-directory: ./ESP # working-directory: ./ESP
run: | # run: |
sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini # sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini
- name: Build OpenIris Firmware - name: Build OpenIris Firmware
working-directory: ./ESP uses: addnab/docker-run-action@v3
with:
image: ghcr.io/zanzythebar/piodocker:latest
options: -v ${{ github.workspace }}/ESP:/workspace
run: | run: |
export OPENIRIS_CI_BUILD=1 export OPENIRIS_CI_BUILD=1
mkdir build mkdir build
mkdir build/${{ matrix.target_name }}${{ matrix.target_build_type }} mkdir build/${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::group::platformio.ini"
cat platformio.ini
echo "::endgroup::"
echo "::group::pio run" echo "::group::pio run"
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }} pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::endgroup::" echo "::endgroup::"