From 21c40e40c9451afe45829a4a2a170d2fdc54614b Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Thu, 11 Feb 2021 16:35:35 -0500 Subject: [PATCH 1/8] Re-enable Datalad SSH tests on macOS --- .github/workflows/build-macos.yaml | 14 ++++++++++++++ .github/workflows/build-ubuntu.yaml | 1 - .../workflows/template/build-{{ostype}}.yaml.j2 | 11 +++++------ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 61c2ce5d74..64e5906ca6 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -380,6 +380,20 @@ jobs: hdiutil detach /Volumes/git-annex/ echo /Applications/git-annex.app/Contents/MacOS >> "$GITHUB_PATH" + - name: Set up SSH target + shell: bash + run: | + # coreutils provides a readlink that supports `-f` + brew install coreutils docker docker-machine + mkdir -p ~/.docker/machine/cache + wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso + docker-machine create --driver virtualbox default + eval "$(docker-machine env default)" + export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" + curl -fSsL \ + https://raw.githubusercontent.com/datalad/datalad/master/tools/ci/prep-travis-forssh.sh \ + | bash + echo DATALAD_TESTS_SSH=1 >> "$GITHUB_ENV" - name: Set up environment run: | diff --git a/.github/workflows/build-ubuntu.yaml b/.github/workflows/build-ubuntu.yaml index 70a6aa8cdf..ec6dfe8f00 100644 --- a/.github/workflows/build-ubuntu.yaml +++ b/.github/workflows/build-ubuntu.yaml @@ -416,7 +416,6 @@ jobs: | bash echo DATALAD_TESTS_SSH=1 >> "$GITHUB_ENV" - - name: Set up environment run: | git config --global user.email "test@github.land" diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 35887b5a5d..90319c732c 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -598,16 +598,16 @@ jobs: {{step}} {% endfor %} - {% if ostype == "ubuntu" %} - {# TODO: return for macos! https://github.com/datalad/git-annex/issues/42 - {% if ostype == "ubuntu" or ostype == "macos" %} #} + {% if ostype == "ubuntu" or ostype == "macos" %} - name: Set up SSH target shell: bash run: | {% if ostype == "macos" %} # coreutils provides a readlink that supports `-f` brew install coreutils docker docker-machine - docker-machine --github-api-token="${{ secrets.GITHUB_TOKEN }}" create --driver virtualbox default + mkdir -p ~/.docker/machine/cache + wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso + docker-machine create --driver virtualbox default eval "$(docker-machine env default)" export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" {% endif %} @@ -615,8 +615,7 @@ jobs: https://raw.githubusercontent.com/datalad/datalad/master/tools/ci/prep-travis-forssh.sh \ | bash echo DATALAD_TESTS_SSH=1 >> "$GITHUB_ENV" - - {% elif ostype == "windows" %} + {% elif ostype == "windows" %} - name: Define test host alias shell: cmd run: | From cd9d0f4f206ac5b460be284e7e7b1fa51c072f38 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Tue, 16 Mar 2021 15:51:12 -0400 Subject: [PATCH 2/8] Try a potential fix --- .github/workflows/build-macos.yaml | 2 +- .github/workflows/template/build-{{ostype}}.yaml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 64e5906ca6..28590f2b22 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -387,7 +387,7 @@ jobs: brew install coreutils docker docker-machine mkdir -p ~/.docker/machine/cache wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso - docker-machine create --driver virtualbox default + docker-machine --native-ssh create --driver virtualbox default eval "$(docker-machine env default)" export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" curl -fSsL \ diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 90319c732c..374b947a5b 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -607,7 +607,7 @@ jobs: brew install coreutils docker docker-machine mkdir -p ~/.docker/machine/cache wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso - docker-machine create --driver virtualbox default + docker-machine --native-ssh create --driver virtualbox default eval "$(docker-machine env default)" export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" {% endif %} From b79f504eef72f23510e4df98425f6a0eaf56ed4f Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Tue, 16 Mar 2021 17:07:16 -0400 Subject: [PATCH 3/8] See if this action works better --- .github/workflows/build-macos.yaml | 9 ++++----- .github/workflows/template/build-{{ostype}}.yaml.j2 | 11 ++++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 28590f2b22..6e23ee1246 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -380,15 +380,14 @@ jobs: hdiutil detach /Volumes/git-annex/ echo /Applications/git-annex.app/Contents/MacOS >> "$GITHUB_PATH" + - name: Set up Docker + uses: docker-practice/actions-setup-docker@v1 + - name: Set up SSH target shell: bash run: | # coreutils provides a readlink that supports `-f` - brew install coreutils docker docker-machine - mkdir -p ~/.docker/machine/cache - wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso - docker-machine --native-ssh create --driver virtualbox default - eval "$(docker-machine env default)" + brew install coreutils export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" curl -fSsL \ https://raw.githubusercontent.com/datalad/datalad/master/tools/ci/prep-travis-forssh.sh \ diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 374b947a5b..ffdcc25c30 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -599,16 +599,17 @@ jobs: {% endfor %} {% if ostype == "ubuntu" or ostype == "macos" %} + {% if ostype == "macos" %} + - name: Set up Docker + uses: docker-practice/actions-setup-docker@v1 + + {% endif %} - name: Set up SSH target shell: bash run: | {% if ostype == "macos" %} # coreutils provides a readlink that supports `-f` - brew install coreutils docker docker-machine - mkdir -p ~/.docker/machine/cache - wget -O ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso - docker-machine --native-ssh create --driver virtualbox default - eval "$(docker-machine env default)" + brew install coreutils export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" {% endif %} curl -fSsL \ From def3dd12eea829dcc7038246d878e0e7d95c7360 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Wed, 17 Mar 2021 08:45:31 -0400 Subject: [PATCH 4/8] Set TMPDIR="$HOME"/DLTMP --- .github/workflows/build-macos.yaml | 1 + .github/workflows/template/build-{{ostype}}.yaml.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 6e23ee1246..3f5678729b 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -397,6 +397,7 @@ jobs: - name: Set up environment run: | brew install exempi # Needed by python-xmp-toolkit + echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index ffdcc25c30..8e6851a676 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -675,6 +675,7 @@ jobs: run: | {% if ostype == "macos" %} brew install exempi # Needed by python-xmp-toolkit + echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" {% endif %} git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" From bb53ead3e34d0662022100ce631f171964fba5be Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Wed, 17 Mar 2021 09:27:29 -0400 Subject: [PATCH 5/8] Create ~/DLTMP --- .github/workflows/build-macos.yaml | 1 + .github/workflows/template/build-{{ostype}}.yaml.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 3f5678729b..01848418c1 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -397,6 +397,7 @@ jobs: - name: Set up environment run: | brew install exempi # Needed by python-xmp-toolkit + mkdir -p ~/DLTMP echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 8e6851a676..4738dc1b29 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -675,6 +675,7 @@ jobs: run: | {% if ostype == "macos" %} brew install exempi # Needed by python-xmp-toolkit + mkdir -p ~/DLTMP echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" {% endif %} git config --global user.email "test@github.land" From 00f2d2974e1f9c3f4e680918b2b68dcbec91fb5a Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Thu, 18 Mar 2021 17:05:02 -0400 Subject: [PATCH 6/8] Set TMPDIR=/tmp/DLTMP --- .github/workflows/template/build-{{ostype}}.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 4738dc1b29..0ce58f2f42 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -675,8 +675,8 @@ jobs: run: | {% if ostype == "macos" %} brew install exempi # Needed by python-xmp-toolkit - mkdir -p ~/DLTMP - echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" + mkdir -p /tmp/DLTMP + echo TMPDIR=/tmp/DLTMP >> "$GITHUB_ENV" {% endif %} git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" From b52f04e9fa3d8be3eab1baf7bd9eedcbbd67c024 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Wed, 24 Mar 2021 11:35:35 -0400 Subject: [PATCH 7/8] Update the actual workflow --- .github/workflows/build-macos.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 01848418c1..5cbac4008c 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -397,8 +397,8 @@ jobs: - name: Set up environment run: | brew install exempi # Needed by python-xmp-toolkit - mkdir -p ~/DLTMP - echo TMPDIR="$HOME"/DLTMP >> "$GITHUB_ENV" + mkdir -p /tmp/DLTMP + echo TMPDIR=/tmp/DLTMP >> "$GITHUB_ENV" git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" From 2925e14ede4bf594a5dfb8662bee412bee885e47 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Thu, 8 Apr 2021 09:35:50 -0400 Subject: [PATCH 8/8] Use resolved path for TMPDIR --- .github/workflows/build-macos.yaml | 4 ++-- .github/workflows/template/build-{{ostype}}.yaml.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 5cbac4008c..e31cb1cc0d 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -397,8 +397,8 @@ jobs: - name: Set up environment run: | brew install exempi # Needed by python-xmp-toolkit - mkdir -p /tmp/DLTMP - echo TMPDIR=/tmp/DLTMP >> "$GITHUB_ENV" + mkdir -p /private/tmp/DLTMP + echo TMPDIR=/private/tmp/DLTMP >> "$GITHUB_ENV" git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty" diff --git a/.github/workflows/template/build-{{ostype}}.yaml.j2 b/.github/workflows/template/build-{{ostype}}.yaml.j2 index 0ce58f2f42..5c279d373b 100644 --- a/.github/workflows/template/build-{{ostype}}.yaml.j2 +++ b/.github/workflows/template/build-{{ostype}}.yaml.j2 @@ -675,8 +675,8 @@ jobs: run: | {% if ostype == "macos" %} brew install exempi # Needed by python-xmp-toolkit - mkdir -p /tmp/DLTMP - echo TMPDIR=/tmp/DLTMP >> "$GITHUB_ENV" + mkdir -p /private/tmp/DLTMP + echo TMPDIR=/private/tmp/DLTMP >> "$GITHUB_ENV" {% endif %} git config --global user.email "test@github.land" git config --global user.name "GitHub Almighty"