From 56b093c7ab0e3c2ad60df601d54856f7194fa0d6 Mon Sep 17 00:00:00 2001 From: Euripedes Date: Mon, 5 Jun 2023 03:35:56 -0300 Subject: [PATCH] Revert "feat: Adds github action" --- .github/workflows/build-and-target-test.yml | 37 ------------ .github/workflows/build-app.yml | 59 ------------------ .github/workflows/run-on-target.yml | 64 -------------------- .github/workflows/test-examples.yml | 66 --------------------- ci/build-test-rules.yml | 11 ---- ci/idf_build_apps.toml | 2 - 6 files changed, 239 deletions(-) delete mode 100644 .github/workflows/build-and-target-test.yml delete mode 100644 .github/workflows/build-app.yml delete mode 100644 .github/workflows/run-on-target.yml delete mode 100644 .github/workflows/test-examples.yml delete mode 100644 ci/build-test-rules.yml delete mode 100644 ci/idf_build_apps.toml diff --git a/.github/workflows/build-and-target-test.yml b/.github/workflows/build-and-target-test.yml deleted file mode 100644 index dad45e5..0000000 --- a/.github/workflows/build-and-target-test.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build app an run on target - -on: - workflow_call: - inputs: - idf_version: - required: true - type: string - target: - required: true - type: string - app_name: - type: string - required: true - app_path: - type: string - required: true - - -jobs: - build-app: - uses: "./.github/workflows/build-app.yml" - with: - idf_version: ${{inputs.idf_version}} - target: ${{inputs.target}} - app_name: ${{inputs.app_name}} - app_path: ${{inputs.app_path}} - - # run-on-target: - # needs: build-app - # uses: "./.github/workflows/run-on-target.yml" - # with: - # idf_version: ${{inputs.idf_version}} - # target: ${{inputs.target}} - # app_name: ${{inputs.app_name}} - # app_path: ${{inputs.app_path}} - diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml deleted file mode 100644 index f9d089e..0000000 --- a/.github/workflows/build-app.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Build app - -on: - workflow_call: - inputs: - idf_version: - required: true - type: string - target: - required: true - type: string - app_name: - type: string - required: true - app_path: - type: string - required: true - upload_artifacts: - type: boolean - default: true - -jobs: - build: - name: Build App - runs-on: ubuntu-20.04 - container: espressif/idf:${{inputs.idf_version}} - steps: - - if: ${{ env.ACT }} - name: Add node for local tests - run: | - curl -fsSL https://deb.nodesource.com/setup_14.x | bash - - apt-get install -y nodejs - - name: Checkout esp-mqtt - uses: actions/checkout@v3 - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{inputs.idf_version}}-${{inputs.target}} - - name: Build ${{ inputs.app_name }} with IDF-${{ inputs.idf_version }} - shell: bash - run: | - ${IDF_PATH}/install.sh --enable-pytest - . ${IDF_PATH}/export.sh - python -m pip install idf-build-apps - rm -rf $IDF_PATH/components/mqtt/esp-mqtt - cp -r . $IDF_PATH/components/mqtt/esp-mqtt - IDF_CCACHE_ENABLE=1 idf-build-apps build --config-file ci/idf_build_apps.toml -p ${{inputs.app_path}} -t ${{inputs.target}} - - name: Upload files to artifacts for run-target job - uses: actions/upload-artifact@v3 - if: ${{inputs.upload_artifacts}} - with: - name: mqtt_bin_${{inputs.target}}_${{ inputs.idf_version }}_${{ inputs.app_name }} - path: | - build_${{inputs.target}}_${{inputs.app_name}}/bootloader/bootloader.bin - build_${{inputs.target}}_${{inputs.app_name}}/partition_table/partition-table.bin - build_${{inputs.target}}_${{inputs.app_name}}/*.bin - build_${{inputs.target}}_${{inputs.app_name}}/*.elf - build_${{inputs.target}}_${{inputs.app_name}}/flasher_args.json - if-no-files-found: error diff --git a/.github/workflows/run-on-target.yml b/.github/workflows/run-on-target.yml deleted file mode 100644 index 6730c83..0000000 --- a/.github/workflows/run-on-target.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Run on target - -on: - workflow_call: - inputs: - idf_version: - required: true - type: string - target: - required: true - type: string - app_name: - type: string - required: true - app_path: - type: string - required: true - -jobs: - target-test: - if: github.repository == 'espressif/esp-mqtt' - name: Run App on target - env: - IDF_PATH: idf - runs-on: [self-hosted, ESP32-ETHERNET-KIT] - steps: - - name: Select idf ref - id: detect_version - run: | - if echo "${{inputs.idf_version}}" | grep "latest" -> /dev/null ; then - echo ref="master" >> "$GITHUB_OUTPUT" - else - echo ref="`echo ${{matrix.idf_version}} | sed -s "s/-/\//"`" >> "$GITHUB_OUTPUT" - fi - - name: IP discovery - id: detect_ip - run: | - apt-get update && apt-get install -y iproute2 - ip route - echo runner_ip ="`ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'`" >> "$GITHUB_OUTPUT" - - name: Checkout IDF ${{inputs.idf_version}} - uses: actions/checkout@v3 - with: - repository: espressif/esp-idf - path: ${{env.IDF_PATH}} - ref: ${{steps.detect_version.outputs.ref}} - - name: Install Python packages - env: - PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" - run: | - pip install --only-binary cryptography -r ${{env.IDF_PATH}}/tools/requirements/requirements.pytest.txt - - uses: actions/download-artifact@v3 - with: - name: mqtt_bin_${{inputs.target}}_${{ inputs.idf_version }}_${{ inputs.app_name }} - path: build - - - name: Run ${{inputs.app_name}} application on ${{inputs.target}} - run: | - python -m pytest ${{inputs.app_path}} --log-cli-level DEBUG --app-path . --junit-xml=./results_${{inputs.app_name}}_${{inputs.idf_version}}.xml --target=${{inputs.target}} - - uses: actions/upload-artifact@v3 - if: always() - with: - name: results_${{inputs.app_name}}_${{inputs.idf_version}}.xml - path: build/*.xml diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml deleted file mode 100644 index d112a69..0000000 --- a/.github/workflows/test-examples.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: "Build example apps" - -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, reopened, labeled] - -jobs: - cpp-compatibility: - name: Cpp compatibility - strategy: - matrix: - idf_version: ["release-v5.0", "release-v5.1", "latest"] - target: ["esp32"] - example: [{name: cpp_compatibility, path: "build_test"}] - uses: "./.github/workflows/build-app.yml" - with: - idf_version: ${{matrix.idf_version}} - target: ${{matrix.target}} - app_name: ${{matrix.example.name}} - app_path: $IDF_PATH/tools/test_apps/protocols/mqtt/${{matrix.example.path}} - upload_artifacts: false - build-only-example: - name: Build Only Apps - strategy: - matrix: - idf_version: ["release-v5.0", "release-v5.1", "latest"] - target: ["esp32s2", "esp32c3", "esp32s3"] - example: [{name: ssl_psk, path: "mqtt/ssl_psk"}] - uses: "./.github/workflows/build-app.yml" - with: - idf_version: ${{matrix.idf_version}} - target: ${{matrix.target}} - app_name: ${{matrix.example.name}} - app_path: $IDF_PATH/examples/protocols/${{matrix.example.path}} - - build-only-ds-example: - name: Build Only Apps - strategy: - matrix: - idf_version: ["release-v5.0", "release-v5.1", "latest"] - target: ["esp32s2", "esp32c3", "esp32s3"] - example: [{name: ssl_ds, path: "mqtt/ssl_ds"}, {name: ssl_psk, path: "mqtt/ssl_psk"}] - uses: "./.github/workflows/build-app.yml" - with: - idf_version: ${{matrix.idf_version}} - target: ${{matrix.target}} - app_name: ${{matrix.example.name}} - app_path: $IDF_PATH/examples/protocols/${{matrix.example.path}} - - build-examples: - name: Build and Run on target - strategy: - matrix: - idf_version: ["release-v5.0", "release-v5.1", "latest"] - target: ["esp32"] - example: [{name: tcp, path: "mqtt/tcp"}, {name: ssl, path: "mqtt/ssl"},{name: ssl_mutual_auth, path: "mqtt/ssl_mutual_auth"},{name: ws, path: "mqtt/ws"},{name: wss, path: "mqtt/wss"}] - uses: "./.github/workflows/build-and-target-test.yml" - with: - idf_version: ${{matrix.idf_version}} - target: ${{matrix.target}} - app_name: ${{matrix.example.name}} - app_path: $IDF_PATH/examples/protocols/${{matrix.example.path}} - diff --git a/ci/build-test-rules.yml b/ci/build-test-rules.yml deleted file mode 100644 index ebc2ec3..0000000 --- a/ci/build-test-rules.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps - -examples/protocols: - enable: - - if: IDF_TARGET in ["esp32"] - -examples/protocols/mqtt/ssl_ds: - disable: - - if: SOC_DIG_SIGN_SUPPORTED != 1 - temporary: false - reason: DS not present diff --git a/ci/idf_build_apps.toml b/ci/idf_build_apps.toml deleted file mode 100644 index c93a728..0000000 --- a/ci/idf_build_apps.toml +++ /dev/null @@ -1,2 +0,0 @@ -build_dir = "$GITHUB_WORKSPACE/build_@t_@n" -config="sdkconfig.ci"