diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 41c354b1..73041bfd 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -47,10 +47,20 @@ jobs: yarn build yarn package # only publish builds if they pass post-build tests + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: build + miniforge-version: latest + auto-update-conda: true + python-version: 3.12 + use-mamba: true - name: postbuild-tests working-directory: ./electron-app shell: bash run: | + conda init + source ~/.bashrc ./run_postbuild_tests.sh - name: Build distributables working-directory: ./electron-app diff --git a/.github/workflows/postbuildchecks.yml b/.github/workflows/postbuildchecks.yml index 4279b04f..16969f69 100644 --- a/.github/workflows/postbuildchecks.yml +++ b/.github/workflows/postbuildchecks.yml @@ -28,26 +28,32 @@ jobs: - uses: nanasess/setup-chromedriver@v2 with: chromedriver-version: "126.0.6478.185" - - name: Set up Python - uses: actions/setup-python@v5 + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v3 with: - python-version: "3.12" + activate-environment: build + miniforge-version: latest + auto-update-conda: true + auto-activate-base: true + python-version: 3.12 + use-mamba: true - name: Install the latest version of uv uses: astral-sh/setup-uv@v2 - name: install MacOS (M1) build dependencies - shell: bash + shell: bash -el {0} # required to sustain the conda environment run: | if [ "$RUNNER_OS" == "macOS" ] && [ "$RUNNER_ARCH" == "ARM64" ]; then brew install pango fi # setuptools needs to be available globally for the yarn build script - name: Install setuptools + shell: bash -el {0} # required to sustain the conda environment run: | python -m pip install --upgrade pip python -m pip install setuptools - name: build working-directory: ./electron-app - shell: bash + shell: bash -el {0} # required to sustain the conda environment run: | corepack enable ./build_deps.sh @@ -56,7 +62,7 @@ jobs: yarn build yarn package - name: install docker MacOS (Intel chips) - shell: bash + shell: bash -el {0} # required to sustain the conda environment run: | if [ "$RUNNER_OS" == "macOS" ] && [ "$RUNNER_ARCH" == "X64" ]; then brew install docker @@ -68,6 +74,6 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: postbuild-tests working-directory: ./electron-app - shell: bash + shell: bash -el {0} # required to sustain the conda environment run: | ./run_postbuild_tests.sh diff --git a/.github/workflows/publish_build.yml b/.github/workflows/publish_build.yml index 6b5bfb99..88120c2a 100644 --- a/.github/workflows/publish_build.yml +++ b/.github/workflows/publish_build.yml @@ -48,13 +48,21 @@ jobs: - name: tmate debugging uses: mxschmitt/action-tmate@v3 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + # only publish builds if they pass post-build tests + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: build + miniforge-version: latest + auto-update-conda: true + python-version: 3.12 + use-mamba: true - name: postbuild-tests working-directory: ./electron-app shell: bash - # 'yarn package' is only run to allow build_testsuite.sh to run before - # the package is pushed for publishing ('yarn run publish' builds and - # publishes in one step) run: | + conda init + source ~/.bashrc yarn package ./run_postbuild_tests.sh - name: publish diff --git a/electron-app/postbuild_tests/modules.test.ts b/electron-app/postbuild_tests/modules.test.ts index a7c9b8a0..15ca1188 100644 --- a/electron-app/postbuild_tests/modules.test.ts +++ b/electron-app/postbuild_tests/modules.test.ts @@ -614,6 +614,8 @@ describe('modules', () => { ])( "Build and Test the conda workflow: module '%s'", async (modulenames, connections, outfiles) => { + console.log('::: test Build and Test the conda workflow'); + // Open settings pane await driver.findElement(By.xpath('//div[@id="btnSidenavSettings"]')).click(); @@ -627,6 +629,7 @@ describe('modules', () => { // Build and run workflow await BuildAndRun_MultiModuleWorkflow(driver, modulenames, connections, outfiles); + console.log('<<< test Build and Test the conda workflow'); }, 5 * ONE_MINUTE, ); // long timeout diff --git a/electron-app/run_postbuild_tests.sh b/electron-app/run_postbuild_tests.sh index 8b82c71a..3349fe41 100755 --- a/electron-app/run_postbuild_tests.sh +++ b/electron-app/run_postbuild_tests.sh @@ -17,7 +17,7 @@ RUNNER_OS=${RUNNER_OS:-$(uname)} # install miniforge if not already installed if ! command -v mamba &> /dev/null then - . ./install_miniforge.sh + source ./install_miniforge.sh fi # launch GRAPEVNE in the background and in debug mode