Skip to content

Commit

Permalink
It's like workflows don't want me to escape...
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Dec 2, 2024
1 parent 3480eb1 commit 1bd6868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
env:
# MicroPython version will be contained in github.event.release.tag_name for releases
RELEASE_FILE: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython
CI_PROJECT_ROOT: src-${{ github.sha }}
CI_PROJECT_ROOT: ${{ github.workspace }}/src-${{ github.sha }}
CI_BUILD_ROOT: ${{ github.workspace }}

steps:
Expand All @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
path: src-${{ github.sha }}
path: ${{ env.CI_PROJECT_ROOT }}

- name: "Install Arm GNU Toolchain (arm-none-eabi-gcc)"
uses: carlosperate/arm-none-eabi-gcc-action@v1
Expand All @@ -47,21 +47,22 @@ jobs:
- name: "Prepare tools & dependencies"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
mkdir -p $CI_BUILD_ROOT
ci_apt_install_build_deps
ci_prepare_all
- name: "MicroPython: Configure"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
micropython_version
ci_cmake_configure ${{ matrix.name }}
- name: "MicroPython: Build"
shell: bash
run: |
source $CI_PROJECT_ROOT/ci/micropython.sh
source $CI_PROJECT_ROOT/ci/micropython.sh && ci_debug
ci_cmake_build ${{ matrix.name }}
mv build-${{ matrix.name }}.uf2 ${{ env.RELEASE_FILE }}.uf2
Expand Down
8 changes: 1 addition & 7 deletions ci/micropython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,7 @@ function ci_prepare_all {
ci_micropython_build_mpy_cross
}

function ci_github_actions_fixup {
# GitHub Actions meddles with . and source causing our paths to be broken
# This fixup attempts to put things right\
SCRIPT_PATH=$1
CI_PROJECT_ROOT=$(realpath "$SCRIPT_PATH/..")
export CI_BUILD_ROOT="$(pwd)/build"
mkdir -p "$CI_BUILD_ROOT"
function ci_debug {
log_inform "Project root: $CI_PROJECT_ROOT"
log_inform "Build root: $CI_BUILD_ROOT"
}
Expand Down

0 comments on commit 1bd6868

Please sign in to comment.