diff --git a/.github/actions/create-dev-env/action.yml b/.github/actions/create-dev-env/action.yml index 169d8bcb..07ed5c23 100644 --- a/.github/actions/create-dev-env/action.yml +++ b/.github/actions/create-dev-env/action.yml @@ -15,13 +15,26 @@ runs: # See: https://github.com/actions/setup-python/issues/108 # python3 is manually preinstalled in the arm64 VM self-hosted runner - name: Set Up Python 🐍 + if: ${{ inputs.architecture == 'amd64' }} uses: actions/setup-python@v4 with: python-version: 3.x - if: ${{ inputs.architecture == 'amd64' }} + + - name: System set for macOS runner + if: ${{ inputs.architecture == 'arm64' }} + run: | + export GITHUB_RUNNER_USER=$(whoami) + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile + echo 'export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile + echo 'export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile + shell: bash - name: Install Dev Dependencies 📦 run: | + echo $(whoami) + echo $(which python) + echo $(python --version) + echo $PATH pip install --upgrade pip pip install --upgrade -r requirements-dev.txt shell: bash diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index ae718f6b..15ed6d04 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -56,7 +56,9 @@ jobs: shell: bash - name: Save image as a tar for later use 💾 - run: docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar + run: | + mkdir -p /tmp/aiidalab/ + docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar shell: bash - name: Upload image as artifact 💾 diff --git a/aarch64-runner/setup.sh b/aarch64-runner/setup.sh index 4b528d60..e7e8fc65 100755 --- a/aarch64-runner/setup.sh +++ b/aarch64-runner/setup.sh @@ -60,11 +60,12 @@ sudo -i -u ${GITHUB_RUNNER_USER} bash << EOF curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh echo "Setting up python3" brew install python -# For Apple Silicon machines, the path are slightly different. +# For Apple Silicon machines, the path are slightly different. # After running brew install python, must ensure your ~/.zprofile uses the correct Homebrew paths: echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile echo 'export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile -echo "Setting up docker" +echo 'export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"' >> /Users/${GITHUB_RUNNER_USER}/.zprofile +echo "Setting up docker " brew install docker brew install colima EOF