From cdb8c3a694412f403eea4c147f6742adc2dd374c Mon Sep 17 00:00:00 2001 From: AI Issue Solver Date: Fri, 29 May 2026 06:39:02 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20L=C3=B6se=20Issue=20#1=20=E2=80=94=20[AI?= =?UTF-8?q?]=20Keine=20CI/CD-Pipeline=20(GitHub=20Actions)=20vorhanden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatisch gelöst mit AI Issue Solver (Modell: mistral-vibe) Issue: https://github.com/SaJaToGu/Arduino/issues/1 --- .github/workflows/ci.yml | 167 ++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 57 ++++++++++ .github/workflows/docs.yml | 43 ++++++++ .github/workflows/style-check.yml | 37 +++++++ 4 files changed, 304 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/style-check.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..6f6a83d68b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,167 @@ +name: CI + +on: + push: + branches: + - master + - ai/fix-issue-1 + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build & Test + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + # PlatformIO builds + - job_name: PlatformIO (even) + script: tests/platformio.sh + build_parity: even + - job_name: PlatformIO (odd) + script: tests/platformio.sh + build_parity: odd + # Arduino builds + - job_name: Arduino Build (even) + script: tests/build.sh + build_parity: even + - job_name: Arduino Build (odd) + script: tests/build.sh + build_parity: odd + # Debug builds + - job_name: Debug Build (even) + script: tests/debug.sh + build_parity: even + - job_name: Debug Build (odd) + script: tests/debug.sh + build_parity: odd + # IPv6 builds + - job_name: IPv6 Build (even) + script: tests/build6.sh + build_parity: even + - job_name: IPv6 Build (odd) + script: tests/build6.sh + build_parity: odd + # lwIP-v1.4 builds + - job_name: lwIP-v1.4 Build (even) + script: tests/build1.sh + build_parity: even + - job_name: lwIP-v1.4 Build (odd) + script: tests/build1.sh + build_parity: odd + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: | + echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + echo "CC=gcc-7" >> $GITHUB_ENV + echo "CXX=g++-7" >> $GITHUB_ENV + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y g++-7 gcc-7 arduino valgrind lcov + # Install xtensa toolchain + wget -q https://github.com/esp8266/Arduino/releases/download/2.5.2/xtensa-lx106-elf-linux64-1.22.0-98.txz + tar -xf xtensa-lx106-elf-linux64-1.22.0-98.txz -C ~/ + echo "$HOME/xtensa-lx106-elf/bin" >> $GITHUB_PATH + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install Python dependencies + run: | + pip install --user -U platformio + pip install --user -r doc/requirements.txt 2>/dev/null || true + + - name: Prepare PlatformIO (for PlatformIO jobs) + if: contains(matrix.script, 'platformio') + run: | + pip install --user -U https://github.com/platformio/platformio/archive/develop.zip + platformio platform install "https://github.com/platformio/platform-espressif8266.git#feature/stage" + sed -i 's|https://github.com/esp8266/Arduino.git|*|' ~/.platformio/platforms/espressif8266/platform.json + ln -s $GITHUB_WORKSPACE ~/.platformio/packages/framework-arduinoespressif8266 + pio lib install "ArduinoJson@^6.11.0" + + - name: Make scripts executable + run: | + chmod +x tests/*.sh + chmod +x tests/ci/*.sh + + - name: Run test script + run: | + export BUILD_PARITY=${{ matrix.build_parity }} + ${{ matrix.script }} + + host-tests: + name: Host Tests + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: | + echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + echo "CC=gcc-7" >> $GITHUB_ENV + echo "CXX=g++-7" >> $GITHUB_ENV + + - name: Install dependencies + run: sudo apt-get install -y valgrind lcov + + - name: Run host tests + run: | + chmod +x tests/ci/host_test.sh + tests/ci/host_test.sh + + mock-test: + name: Mock Trivial Test + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: | + echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + echo "CC=gcc-7" >> $GITHUB_ENV + echo "CXX=g++-7" >> $GITHUB_ENV + + - name: Run mock test + run: | + chmod +x tests/buildm.sh + tests/buildm.sh + + build-boards: + name: Build Boards + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + + - name: Build boards + run: | + chmod +x tests/ci/build_boards.sh + tests/ci/build_boards.sh diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..9b9e3f2082 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,57 @@ +name: Deploy + +on: + push: + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-package: + name: Build Package + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Set environment variables + run: echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install dependencies + run: sudo apt-get install -y python3-pip + + - name: Build package + run: | + chmod +x tests/ci/build_package.sh + BUILD_TYPE=package tests/ci/build_package.sh + + - name: Create release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + package/versions/${{ github.ref_name }}/esp8266-${{ github.ref_name }}.zip + package/versions/${{ github.ref_name }}/package_esp8266com_index.json + draft: true + tag_name: ${{ github.ref_name }} + target_commitish: ${{ github.sha }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update package index + if: startsWith(github.ref, 'refs/tags/') + run: | + chmod +x package/deploy_package_index.sh + bash package/deploy_package_index.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..6dac282dc9 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Documentation + +on: + push: + branches: + - master + - ai/fix-issue-1 + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-docs: + name: Build Documentation + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y python3-pip + pip3 install --user -r doc/requirements.txt + + - name: Build documentation + run: | + chmod +x tests/ci/build_docs.sh + tests/ci/build_docs.sh diff --git a/.github/workflows/style-check.yml b/.github/workflows/style-check.yml new file mode 100644 index 0000000000..1f55d9c42c --- /dev/null +++ b/.github/workflows/style-check.yml @@ -0,0 +1,37 @@ +name: Style Check + +on: + push: + branches: + - master + - ai/fix-issue-1 + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + style-check: + name: Code Style Check + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: false + + - name: Set environment variables + run: echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV + + - name: Install astyle + run: | + chmod +x tests/ci/install_astyle.sh + tests/ci/install_astyle.sh + + - name: Run style check + run: | + chmod +x tests/ci/style_check.sh + tests/ci/style_check.sh