From 5b4184405c13f94755e0dd57bee63483579e724c Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Tue, 23 Jul 2024 09:24:01 -0700 Subject: [PATCH] Remove obsolete TRAVISCI variables Use GH native ones instead. --- .github/workflows/pull-request.yml | 5 ----- .github/workflows/release-to-publish.yml | 1 - .github/workflows/tag-to-draft-release.yml | 1 - tests/build-tinyusb.sh | 2 +- tests/build.sh | 2 +- tests/ci/build_boards.sh | 2 +- tests/ci/build_docs.sh | 2 +- tests/ci/build_package.sh | 6 +++--- tests/ci/host_test.sh | 2 +- tests/ci/style_check.sh | 2 +- tests/common.sh | 16 ++++++++-------- tests/debug.sh | 2 +- tests/run_CI_locally.sh | 2 +- 13 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bc21b418..e029e3dd 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -6,11 +6,6 @@ name: Arduino-Pico CI on: pull_request: -env: - TRAVIS_BUILD_DIR: ${{ github.workspace }} - TRAVIS_TAG: ${{ github.ref }} - - jobs: # Consistent style, spelling diff --git a/.github/workflows/release-to-publish.yml b/.github/workflows/release-to-publish.yml index 10bd8123..795b26e8 100644 --- a/.github/workflows/release-to-publish.yml +++ b/.github/workflows/release-to-publish.yml @@ -33,7 +33,6 @@ jobs: # pip install --upgrade platformio - name: Deploy updated JSON env: - TRAVIS_BUILD_DIR: ${{ github.workspace }} BUILD_TYPE: package CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }} PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} diff --git a/.github/workflows/tag-to-draft-release.yml b/.github/workflows/tag-to-draft-release.yml index f6abb636..b62dc2ff 100644 --- a/.github/workflows/tag-to-draft-release.yml +++ b/.github/workflows/tag-to-draft-release.yml @@ -24,7 +24,6 @@ jobs: python-version: '3.x' - name: Build package JSON env: - TRAVIS_BUILD_DIR: ${{ github.workspace }} BUILD_TYPE: package CI_GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/tests/build-tinyusb.sh b/tests/build-tinyusb.sh index ae5f22b8..b9118fd1 100755 --- a/tests/build-tinyusb.sh +++ b/tests/build-tinyusb.sh @@ -2,7 +2,7 @@ cache_dir=$(mktemp -d) -source "$TRAVIS_BUILD_DIR"/tests/common.sh +source "$GITHUB_WORKSPACE"/tests/common.sh install_arduino nodebug diff --git a/tests/build.sh b/tests/build.sh index 82ed7207..ad7b7b24 100755 --- a/tests/build.sh +++ b/tests/build.sh @@ -2,7 +2,7 @@ cache_dir=$(mktemp -d) -source "$TRAVIS_BUILD_DIR"/tests/common.sh +source "$GITHUB_WORKSPACE"/tests/common.sh if [ -z "$BUILD_PARITY" ]; then mod=1 diff --git a/tests/ci/build_boards.sh b/tests/ci/build_boards.sh index a263bdad..7bcdaacb 100755 --- a/tests/ci/build_boards.sh +++ b/tests/ci/build_boards.sh @@ -4,7 +4,7 @@ set -ev -cd $TRAVIS_BUILD_DIR +cd $GITHUB_WORKSPACE tools/boards.txt.py --boardsgen --ldgen --packagegen --docgen diff --git a/tests/ci/build_docs.sh b/tests/ci/build_docs.sh index 31db9f8f..5c7e85ed 100755 --- a/tests/ci/build_docs.sh +++ b/tests/ci/build_docs.sh @@ -4,6 +4,6 @@ set -ev -cd $TRAVIS_BUILD_DIR/doc +cd $GITHUB_WORKSPACE/doc SPHINXOPTS="-W" make html diff --git a/tests/ci/build_package.sh b/tests/ci/build_package.sh index 11e9acf6..5ec8ca53 100755 --- a/tests/ci/build_package.sh +++ b/tests/ci/build_package.sh @@ -4,13 +4,13 @@ set -ev -export PKG_URL=https://github.com/esp8266/Arduino/releases/download/$TRAVIS_TAG/esp8266-$TRAVIS_TAG.zip -export DOC_URL=https://arduino-esp8266.readthedocs.io/en/$TRAVIS_TAG/ +export PKG_URL=https://github.com/esp8266/Arduino/releases/download/$GITHUB_REF/esp8266-$GITHUB_REF.zip +export DOC_URL=https://arduino-esp8266.readthedocs.io/en/$GITHUB_REF/ if [ -z "$CI_GITHUB_API_KEY" ]; then echo "Github API key not set. Skip building the package." exit 0 fi -cd $TRAVIS_BUILD_DIR/package +cd $GITHUB_WORKSPACE/package ./build_boards_manager_package.sh diff --git a/tests/ci/host_test.sh b/tests/ci/host_test.sh index ef143f90..f3f73c90 100755 --- a/tests/ci/host_test.sh +++ b/tests/ci/host_test.sh @@ -4,7 +4,7 @@ set -ev -cd $TRAVIS_BUILD_DIR/tests/host +cd $GITHUB_WORKSPACE/tests/host make -j2 FORCE32=0 ssl diff --git a/tests/ci/style_check.sh b/tests/ci/style_check.sh index 609b7e45..69025007 100755 --- a/tests/ci/style_check.sh +++ b/tests/ci/style_check.sh @@ -12,4 +12,4 @@ ${org}/../restyle.sh git --version || true git submodule foreach --recursive 'git reset --hard' -git diff --exit-code -- $TRAVIS_BUILD_DIR +git diff --exit-code -- $GITHUB_WORKSPACE diff --git a/tests/common.sh b/tests/common.sh index 7e1acb6a..f863399c 100755 --- a/tests/common.sh +++ b/tests/common.sh @@ -230,9 +230,9 @@ function install_arduino() { local debug=$1 # Install Arduino IDE and required libraries - cd $TRAVIS_BUILD_DIR - install_ide $HOME/arduino_ide $TRAVIS_BUILD_DIR $debug - cd $TRAVIS_BUILD_DIR + cd $GITHUB_WORKSPACE + install_ide $HOME/arduino_ide $GITHUB_WORKSPACE $debug + cd $GITHUB_WORKSPACE install_libraries } @@ -244,7 +244,7 @@ function build_sketches_with_arduino() # Compile sketches build_sketches $HOME/arduino_ide $HOME/arduino_ide/examples "-l $HOME/Arduino/libraries ${build_extra}" $build_mod $build_rem - build_sketches $HOME/arduino_ide $TRAVIS_BUILD_DIR/libraries "-l $HOME/Arduino/libraries ${build_extra}" $build_mod $build_rem + build_sketches $HOME/arduino_ide $GITHUB_WORKSPACE/libraries "-l $HOME/Arduino/libraries ${build_extra}" $build_mod $build_rem # Generate size report cat size.log @@ -253,11 +253,11 @@ function build_sketches_with_arduino() set -e -if [ -z "$TRAVIS_BUILD_DIR" ]; then - echo "TRAVIS_BUILD_DIR is not set, trying to guess:" +if [ -z "$GITHUB_WORKSPACE" ]; then + echo "GITHUB_WORKSPACE is not set, trying to guess:" pushd $(dirname $0)/../ > /dev/null - TRAVIS_BUILD_DIR=$PWD + GITHUB_WORKSPACE=$PWD popd > /dev/null - echo "TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR" + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" fi diff --git a/tests/debug.sh b/tests/debug.sh index bbca35ff..c0e81841 100755 --- a/tests/debug.sh +++ b/tests/debug.sh @@ -2,7 +2,7 @@ cache_dir=$(mktemp -d) -source "$TRAVIS_BUILD_DIR"/tests/common.sh +source "$GITHUB_WORKSPACE"/tests/common.sh if [ "$BUILD_PARITY" = "even" ]; then mod=2 diff --git a/tests/run_CI_locally.sh b/tests/run_CI_locally.sh index 64b1a3c3..8e571f19 100755 --- a/tests/run_CI_locally.sh +++ b/tests/run_CI_locally.sh @@ -84,7 +84,7 @@ git submodule update --init (cd pico-extras && git submodule update --init) export HOME="${TMPCI}" -export TRAVIS_BUILD_DIR="${TMPCI}" +export GITHUB_WORKSPACE="${TMPCI}" export BUILD_TYPE="$BUILD_TYPE" if [ "$BUILD_TYPE" = "build" ]; then -- 2.54.0