-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sara Damiano <[email protected]>
- Loading branch information
Showing
3 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,12 +55,15 @@ jobs: | |
echo "version=${VER}" >> $GITHUB_OUTPUT | ||
echo "zip_name=${ZIP_FILE}" >> $GITHUB_OUTPUT | ||
check_for_dependencies: | ||
name: Check for any library dependencies | ||
uses: ./.github/workflows/check_for_dependencies.yaml | ||
|
||
prepare_assets: | ||
name: Prepare Release Assets | ||
runs-on: ubuntu-latest | ||
needs: [check_version_number] | ||
outputs: | ||
valid_lib_dep_script: ${{ steps.check_lib_install.outputs.valid_lib_dep_script }} | ||
needs: [check_version_number, check_for_dependencies] | ||
if: ${{ ! failure() && ! cancelled() && needs.check_for_dependencies.outputs.has_dependencies == 'true' }} | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -70,7 +73,7 @@ jobs: | |
uses: EnviroDIY/[email protected] | ||
|
||
- name: Generate Library Installation Script | ||
id: make_dep_install_script | ||
id: py_libraries | ||
run: | | ||
set -e | ||
if [ "$RUNNER_DEBUG" = "1" ]; then | ||
|
@@ -83,15 +86,26 @@ jobs: | |
echo "Generating dependency library installation script" | ||
curl -SL https://raw.githubusercontent.com/EnviroDIY/workflows/main/scripts/generate_library_installation_script.py -o generate_library_installation_script.py | ||
python -u generate_library_installation_script.py | ||
if [ -e continuous_integration_artifacts/install-libraries-platformio.sh ] | ||
then | ||
echo "Copying generated installation" | ||
mv continuous_integration_artifacts/install-libraries-platformio.sh continuous_integration/install-libraries-platformio.sh | ||
else | ||
echo "No library dependencies to install" | ||
fi | ||
else | ||
echo "Dependency installation script found at continuous_integration/install-libraries-platformio.sh" | ||
echo "Dependency installation script found" | ||
fi | ||
- name: copy scripts into working directory, if needed | ||
id: copy_scripts | ||
run: | | ||
set -e | ||
if [ "$RUNNER_DEBUG" = "1" ]; then | ||
echo "Enabling debugging!" | ||
set -v | ||
set -x | ||
fi | ||
mkdir -p continuous_integration | ||
if [ ! -e continuous_integration/install-libraries-platformio.sh ] && [ -e continuous_integration_artifacts/install-libraries-platformio.sh ] | ||
then | ||
echo "No dependecy installation script found, copying script from artifact" | ||
mv continuous_integration_artifacts/install-libraries-platformio.sh continuous_integration/install-libraries-platformio.sh | ||
else | ||
echo "No library dependencies to install" | ||
fi | ||
- name: Verify the library deps install script exists | ||
|
@@ -134,6 +148,7 @@ jobs: | |
- name: Install the library from the master branch | ||
run: | | ||
pio pkg install -g --library https://github.com/EnviroDIY/${GITHUB_REPOSITORY#*/} | ||
pio pkg list -g --only-libraries | ||
# zip up all the installed libraries | ||
# need to cd into the pio directory so we don't get extra junk directories | ||
|
@@ -167,7 +182,7 @@ jobs: | |
name: Create a Release with Assets | ||
runs-on: ubuntu-latest | ||
needs: [check_version_number, prepare_assets] | ||
if: ${{ ! failure() && ! cancelled() && needs.prepare_assets.outputs.valid_lib_dep_script == 'true' }} | ||
if: ${{ ! failure() && ! cancelled() && needs.check_for_dependencies.outputs.has_dependencies == 'true' }} | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -208,7 +223,7 @@ jobs: | |
name: Create a New Release | ||
runs-on: ubuntu-latest | ||
needs: [check_version_number] | ||
if: ${{ ! failure() && ! cancelled() && needs.prepare_assets.outputs.valid_lib_dep_script != 'true' }} | ||
if: ${{ ! failure() && ! cancelled() && needs.check_for_dependencies.outputs.has_dependencies == 'false' }} | ||
|
||
steps: | ||
- name: Checkout code | ||
|