From 562023b730911e95615167e9c417db561e880bac Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Fri, 11 Sep 2020 10:48:03 -0400 Subject: [PATCH 01/12] Combined workflow for building git-annex on Ubuntu and macOS --- ...anstandalone.yaml => build-git-annex.yaml} | 158 ++++++++++++++++-- 1 file changed, 140 insertions(+), 18 deletions(-) rename .github/workflows/{build-git-annex-debianstandalone.yaml => build-git-annex.yaml} (56%) diff --git a/.github/workflows/build-git-annex-debianstandalone.yaml b/.github/workflows/build-git-annex.yaml similarity index 56% rename from .github/workflows/build-git-annex-debianstandalone.yaml rename to .github/workflows/build-git-annex.yaml index 99f5319..570d1ec 100644 --- a/.github/workflows/build-git-annex-debianstandalone.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -4,7 +4,7 @@ on: # Trigger the workflow on pull request, pull_request: paths: - - '.github/workflows/build-git-annex-debianstandalone.yaml' + - '.github/workflows/build-git-annex.yaml' schedule: - cron: '30 01 * * *' @@ -14,19 +14,30 @@ env: jobs: build-package: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: # Do not fail fast so we could upload full build log and possible source # pkgs even if binary package building fails fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest steps: - - name: Set up system + - name: Set up system (Ubuntu) shell: bash run: | bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) sudo apt-get update -qq sudo apt-get install eatmydata sudo eatmydata apt-get install singularity-container gnupg moreutils strace + if: ${{ runner.os == 'Linux' }} + + - name: Set up system (macOS) + shell: bash + run: | + brew install libmagic pkg-config + if: ${{ runner.os == 'macOS' }} - name: Checkout this repository uses: actions/checkout@v1 @@ -38,39 +49,81 @@ jobs: # public key for verification cat resources/datalad-builder-key.asc | gpg --import - - name: Building it all + - name: Building it all (Ubuntu) run: | DEB_BUILD_OPTIONS=nocheck scripts/ci/build_git_annex /tmp/annex-build + if: ${{ runner.os == 'Linux' }} - - name: Cleanup before bundling upload + - name: Building it all (macOS) + run: | + scripts/ci/build_git_annex_macos + if: ${{ runner.os == 'macOS' }} + + - name: Cleanup before bundling upload (Ubuntu) run: find /tmp/annex-build -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 rm -rf + if: ${{ runner.os == 'Linux' }} - - name: Upload packages + - name: Upload packages (Ubuntu) uses: actions/upload-artifact@v2-preview with: name: git-annex-debianstandalone-packages # v2-preview supports globs (https://github.com/actions/upload-artifact/issues/62) path: /tmp/annex-build/git-annex[-_]*.* + if: ${{ runner.os == 'Linux' }} + + - name: Upload packages (macOS) + uses: actions/upload-artifact@v2-preview + with: + name: git-annex-macos-dmg + path: git-annex/tmp/git-annex.dmg + if: ${{ runner.os == 'macOS' }} test-annex: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} needs: build-package strategy: matrix: + os: + - ubuntu-latest + - macos-latest # TODO: add , nfs-home # https://git-annex.branchable.com/bugs/running_tests_on_NFS_HOME_does_not_exit_cleanly__58___gpgtmp/ flavor: [normal, crippled-tmp, crippled-home, nfs-tmp] fail-fast: false steps: - - name: Download git-annex package + - name: Download git-annex package (Ubuntu) uses: actions/download-artifact@v2-preview with: name: git-annex-debianstandalone-packages + if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package + - name: Install git-annex package (Ubuntu) run: | sudo dpkg -i git-annex*.deb + if: ${{ runner.os == 'Linux' }} + + - name: Download git-annex package (macOS) + uses: actions/download-artifact@v2-preview + with: + name: git-annex-macos-dmg + if: ${{ runner.os == 'macOS' }} + + - name: Install git-annex package (macOS) + run: | + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + if: ${{ runner.os == 'macOS' }} + + - name: Add git-annex to PATH (macOS) + run: | + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + if: ${{ runner.os == 'macOS' }} + + - name: Print git-annex version + run: | + git annex version - name: Checkout this repository for scripts/ci uses: actions/checkout@v1 @@ -79,7 +132,17 @@ jobs: shell: bash run: | if echo "${{ matrix.flavor }}" | grep -q "crippled" ; then - scripts/ci/setup_crippledfs /crippledfs 500 + case `uname` in + Linux) + scripts/ci/setup_crippledfs /crippledfs 500 + ;; + Darwin) + scripts/ci/setup_crippledfs_macos crippledfs 500 + ;; + *) + echo "Unknown OS $(uname)" + exit 1 + esac fi if echo "${{ matrix.flavor }}" | grep -q "nfs" ; then mkdir /tmp/nfsmount_ /tmp/nfsmount @@ -91,13 +154,25 @@ jobs: - name: Run tests run: | + case `uname` in + Linux) + crippledfs=/crippledfs + ;; + Darwin) + crippledfs=/Volumes/crippledfs + ;; + *) + echo "Unknown OS $(uname)" + exit 1 + esac + case "${{ matrix.flavor }}" in crippled-tmp) # forces all test repos/paths into the VFAT FS - export TMPDIR=/crippledfs + export TMPDIR=$crippledfs ;; crippled-home) - export HOME=/crippledfs + export HOME=$crippledfs ;; nfs-tmp) export TMPDIR=/tmp/nfsmount @@ -122,20 +197,44 @@ jobs: git annex test test-annex-more: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} needs: build-package strategy: + matrix: + os: + - ubuntu-latest + - macos-latest fail-fast: false steps: - - name: Download git-annex package + - name: Download git-annex package (Ubuntu) uses: actions/download-artifact@v2-preview with: name: git-annex-debianstandalone-packages + if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package + - name: Install git-annex package (Ubuntu) run: | sudo dpkg -i git-annex*.deb + if: ${{ runner.os == 'Linux' }} + + - name: Download git-annex package (macOS) + uses: actions/download-artifact@v2-preview + with: + name: git-annex-macos-dmg + if: ${{ runner.os == 'macOS' }} + + - name: Install git-annex package (macOS) + run: | + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + if: ${{ runner.os == 'macOS' }} + + - name: Add git-annex to PATH (macOS) + run: | + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + if: ${{ runner.os == 'macOS' }} - name: Seek of dynlibs run: | @@ -151,22 +250,45 @@ jobs: test-datalad: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} needs: build-package strategy: matrix: + os: + - ubuntu-latest + - macos-latest version: [master, maint, release] fail-fast: false steps: - - name: Download git-annex package + - name: Download git-annex package (Ubuntu) uses: actions/download-artifact@v2-preview with: name: git-annex-debianstandalone-packages + if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package + - name: Install git-annex package (Ubuntu) run: | sudo dpkg -i git-annex*.deb + if: ${{ runner.os == 'Linux' }} + + - name: Download git-annex package (macOS) + uses: actions/download-artifact@v2-preview + with: + name: git-annex-macos-dmg + if: ${{ runner.os == 'macOS' }} + + - name: Install git-annex package (macOS) + run: | + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + if: ${{ runner.os == 'macOS' }} + + - name: Add git-annex to PATH (macOS) + run: | + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + if: ${{ runner.os == 'macOS' }} - name: Set up SSH target shell: bash From 5826e6187ea603568e62508d6e8e474a3d25d23c Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 08:46:06 -0400 Subject: [PATCH 02/12] Exclude macos-latest + crippled-home for now --- .github/workflows/build-git-annex.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index 570d1ec..c2d6546 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -89,6 +89,13 @@ jobs: # TODO: add , nfs-home # https://git-annex.branchable.com/bugs/running_tests_on_NFS_HOME_does_not_exit_cleanly__58___gpgtmp/ flavor: [normal, crippled-tmp, crippled-home, nfs-tmp] + exclude: + # TODO: Add "crippled-home" back in once we figure out how to stop it + # from hanging + - os: macos-latest + flavor: crippled-home + - os: macos-latest + flavor: nfs-tmp fail-fast: false steps: From 932bae41016d5f9812d30bde2216f1ec824b92b9 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 08:58:16 -0400 Subject: [PATCH 03/12] Combine crippledfs scripts --- .github/workflows/build-git-annex.yaml | 34 ++++------------------- scripts/ci/setup_crippledfs | 37 +++++++++++++++++++------- 2 files changed, 32 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index c2d6546..c02fe4a 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -135,21 +135,11 @@ jobs: - name: Checkout this repository for scripts/ci uses: actions/checkout@v1 - - name: Set up system - shell: bash + - name: Run tests run: | if echo "${{ matrix.flavor }}" | grep -q "crippled" ; then - case `uname` in - Linux) - scripts/ci/setup_crippledfs /crippledfs 500 - ;; - Darwin) - scripts/ci/setup_crippledfs_macos crippledfs 500 - ;; - *) - echo "Unknown OS $(uname)" - exit 1 - esac + # source so that CRIPPLEDFS_PATH will be set: + . scripts/ci/setup_crippledfs crippledfs 500 fi if echo "${{ matrix.flavor }}" | grep -q "nfs" ; then mkdir /tmp/nfsmount_ /tmp/nfsmount @@ -159,27 +149,13 @@ jobs: sudo mount -t nfs localhost:/tmp/nfsmount_ /tmp/nfsmount fi - - name: Run tests - run: | - case `uname` in - Linux) - crippledfs=/crippledfs - ;; - Darwin) - crippledfs=/Volumes/crippledfs - ;; - *) - echo "Unknown OS $(uname)" - exit 1 - esac - case "${{ matrix.flavor }}" in crippled-tmp) # forces all test repos/paths into the VFAT FS - export TMPDIR=$crippledfs + export TMPDIR="$CRIPPLEDFS_PATH" ;; crippled-home) - export HOME=$crippledfs + export HOME="$CRIPPLEDFS_PATH" ;; nfs-tmp) export TMPDIR=/tmp/nfsmount diff --git a/scripts/ci/setup_crippledfs b/scripts/ci/setup_crippledfs index 3504179..ea1e42a 100755 --- a/scripts/ci/setup_crippledfs +++ b/scripts/ci/setup_crippledfs @@ -2,18 +2,35 @@ # set -eu -mountpoint="$1" +name="$1" size="$2" -image="$mountpoint.img" +image="/tmp/$name.img" -sudo apt-get update -qq -sudo apt-get install dosfstools +case `uname` in + Linux) + sudo apt-get update -qq + sudo apt-get install dosfstools -# VFAT FS in a box -sudo dd if=/dev/zero "of=$image" "count=$size" bs=1M -sudo mkfs.vfat "$image" + # VFAT FS in a box + sudo dd if=/dev/zero "of=$image" "count=$size" bs=1M + sudo mkfs.vfat "$image" -# mount -sudo mkdir "$mountpoint" -sudo mount -o "uid=$(id -u),gid=$(id -g)" "$image" "$mountpoint" + # mount + CRIPPLEDFS_PATH="/$name" + sudo mkdir "$CRIPPLEDFS_PATH" + sudo mount -o "uid=$(id -u),gid=$(id -g)" "$image" "$CRIPPLEDFS_PATH" + ;; + Darwin) + hdiutil create -megabytes "$size" -fs FAT32 -volname "$name" "$image" + hdiutil attach "$image" + CRIPPLEDFS_PATH="/Volumes/$name" + ;; + *) + echo "Unknown OS $(uname)" + exit 1 +esac + +unset name +unset size +unset image From ffc44a72747ab0945163c9cf2a30ba1775a55b41 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 08:59:17 -0400 Subject: [PATCH 04/12] Add build_git_annex_macos script --- scripts/ci/build_git_annex_macos | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/ci/build_git_annex_macos diff --git a/scripts/ci/build_git_annex_macos b/scripts/ci/build_git_annex_macos new file mode 100755 index 0000000..d859e7a --- /dev/null +++ b/scripts/ci/build_git_annex_macos @@ -0,0 +1,20 @@ +#!/bin/bash -x + +git clone --depth 1 git://git.kitenet.net/git-annex +cd git-annex + +# Enable build flags that need extra C libs, so are not enabled by +# default. Needs this run to install them: +# brew install --bottle libmagic pkg-config +export BUILDEROPTIONS="--extra-include-dirs=$HOME/homebrew/include --extra-lib-dirs=$HOME/homebrew/lib" +export OSX_MAGIC_FILE="$(brew list --verbose libmagic| grep magic.mgc | head -n 1)" +cat standalone/osx/stack.yaml > stack.yaml.autobuild +export BUILDERCOMMONOPTIONS="--stack-yaml stack.yaml.autobuild" + +export BUILDER=stack +stack setup --stack-yaml stack.yaml.autobuild +# use stack version of ghc +GHC="stack --stack-yaml stack.yaml.autobuild ghc --" +export GHC + +make osxapp || exit 4 From 107395016ec40b72dca8e471b400522e6edbfd8d Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 09:15:41 -0400 Subject: [PATCH 05/12] Use "case" blocks for OS-dependent steps --- .github/workflows/build-git-annex.yaml | 143 +++++++++++++------------ 1 file changed, 74 insertions(+), 69 deletions(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index c02fe4a..d30fab9 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -24,20 +24,23 @@ jobs: - ubuntu-latest - macos-latest steps: - - name: Set up system (Ubuntu) + - name: Set up system shell: bash run: | - bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) - sudo apt-get update -qq - sudo apt-get install eatmydata - sudo eatmydata apt-get install singularity-container gnupg moreutils strace - if: ${{ runner.os == 'Linux' }} - - - name: Set up system (macOS) - shell: bash - run: | - brew install libmagic pkg-config - if: ${{ runner.os == 'macOS' }} + case "${{ runner.os }}" in + Linux) + bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) + sudo apt-get update -qq + sudo apt-get install eatmydata + sudo eatmydata apt-get install singularity-container gnupg moreutils strace + ;; + macOS) + brew install libmagic pkg-config + ;; + *) + echo "Unknown OS ${{ runner.os }}" + exit 1 + esac - name: Checkout this repository uses: actions/checkout@v1 @@ -49,19 +52,21 @@ jobs: # public key for verification cat resources/datalad-builder-key.asc | gpg --import - - name: Building it all (Ubuntu) + - name: Building it all run: | - DEB_BUILD_OPTIONS=nocheck scripts/ci/build_git_annex /tmp/annex-build - if: ${{ runner.os == 'Linux' }} - - - name: Building it all (macOS) - run: | - scripts/ci/build_git_annex_macos - if: ${{ runner.os == 'macOS' }} - - - name: Cleanup before bundling upload (Ubuntu) - run: find /tmp/annex-build -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 rm -rf - if: ${{ runner.os == 'Linux' }} + case "${{ runner.os }}" in + Linux) + DEB_BUILD_OPTIONS=nocheck scripts/ci/build_git_annex /tmp/annex-build + # Cleanup before bundling upload + find /tmp/annex-build -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 rm -rf + ;; + macOS) + scripts/ci/build_git_annex_macos + ;; + *) + echo "Unknown OS ${{ runner.os }}" + exit 1 + esac - name: Upload packages (Ubuntu) uses: actions/upload-artifact@v2-preview @@ -105,28 +110,28 @@ jobs: name: git-annex-debianstandalone-packages if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package (Ubuntu) - run: | - sudo dpkg -i git-annex*.deb - if: ${{ runner.os == 'Linux' }} - - name: Download git-annex package (macOS) uses: actions/download-artifact@v2-preview with: name: git-annex-macos-dmg if: ${{ runner.os == 'macOS' }} - - name: Install git-annex package (macOS) - run: | - hdiutil attach git-annex.dmg - rsync -a /Volumes/git-annex/git-annex.app /Applications/ - hdiutil detach /Volumes/git-annex/ - if: ${{ runner.os == 'macOS' }} - - - name: Add git-annex to PATH (macOS) + - name: Install git-annex package run: | - echo "::add-path::/Applications/git-annex.app/Contents/MacOS" - if: ${{ runner.os == 'macOS' }} + case "${{ runner.os }}" in + Linux) + sudo dpkg -i git-annex*.deb + ;; + macOS) + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + ;; + *) + echo "Unknown OS ${{ runner.os }}" + exit 1 + esac - name: Print git-annex version run: | @@ -196,28 +201,28 @@ jobs: name: git-annex-debianstandalone-packages if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package (Ubuntu) - run: | - sudo dpkg -i git-annex*.deb - if: ${{ runner.os == 'Linux' }} - - name: Download git-annex package (macOS) uses: actions/download-artifact@v2-preview with: name: git-annex-macos-dmg if: ${{ runner.os == 'macOS' }} - - name: Install git-annex package (macOS) + - name: Install git-annex package run: | - hdiutil attach git-annex.dmg - rsync -a /Volumes/git-annex/git-annex.app /Applications/ - hdiutil detach /Volumes/git-annex/ - if: ${{ runner.os == 'macOS' }} - - - name: Add git-annex to PATH (macOS) - run: | - echo "::add-path::/Applications/git-annex.app/Contents/MacOS" - if: ${{ runner.os == 'macOS' }} + case "${{ runner.os }}" in + Linux) + sudo dpkg -i git-annex*.deb + ;; + macOS) + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + ;; + *) + echo "Unknown OS ${{ runner.os }}" + exit 1 + esac - name: Seek of dynlibs run: | @@ -250,28 +255,28 @@ jobs: name: git-annex-debianstandalone-packages if: ${{ runner.os == 'Linux' }} - - name: Install git-annex package (Ubuntu) - run: | - sudo dpkg -i git-annex*.deb - if: ${{ runner.os == 'Linux' }} - - name: Download git-annex package (macOS) uses: actions/download-artifact@v2-preview with: name: git-annex-macos-dmg if: ${{ runner.os == 'macOS' }} - - name: Install git-annex package (macOS) + - name: Install git-annex package run: | - hdiutil attach git-annex.dmg - rsync -a /Volumes/git-annex/git-annex.app /Applications/ - hdiutil detach /Volumes/git-annex/ - if: ${{ runner.os == 'macOS' }} - - - name: Add git-annex to PATH (macOS) - run: | - echo "::add-path::/Applications/git-annex.app/Contents/MacOS" - if: ${{ runner.os == 'macOS' }} + case "${{ runner.os }}" in + Linux) + sudo dpkg -i git-annex*.deb + ;; + macOS) + hdiutil attach git-annex.dmg + rsync -a /Volumes/git-annex/git-annex.app /Applications/ + hdiutil detach /Volumes/git-annex/ + echo "::add-path::/Applications/git-annex.app/Contents/MacOS" + ;; + *) + echo "Unknown OS ${{ runner.os }}" + exit 1 + esac - name: Set up SSH target shell: bash From d83db0ec1e091598cd5ce4f4ce8a1b92cc0bf252 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 10:28:32 -0400 Subject: [PATCH 06/12] Add link to crippled-home issue --- .github/workflows/build-git-annex.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index d30fab9..7af0736 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -95,8 +95,9 @@ jobs: # https://git-annex.branchable.com/bugs/running_tests_on_NFS_HOME_does_not_exit_cleanly__58___gpgtmp/ flavor: [normal, crippled-tmp, crippled-home, nfs-tmp] exclude: - # TODO: Add "crippled-home" back in once we figure out how to stop it - # from hanging + # TODO: Add "crippled-home" back in once + # + # is fixed - os: macos-latest flavor: crippled-home - os: macos-latest From 7bea6eaa81489934a02f9a7849902d3ccc0ae962 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 14 Sep 2020 11:22:08 -0400 Subject: [PATCH 07/12] Install Docker in macOS --- .github/workflows/build-git-annex.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index 7af0736..fbbf694 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -284,6 +284,13 @@ jobs: # TODO: Drop the release condition once 0.13.2 is released. run: | if [ "${{ matrix.version }}" != "release" ]; then + if [ "${{ runner.os }}" = macOS ]; then + # coreutils provides a readlink that supports `-f` + brew install coreutils docker docker-machine + docker-machine create --driver virtualbox default + eval "$(docker-machine env default)" + export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" + fi curl -fSsL \ https://raw.githubusercontent.com/datalad/datalad/master/tools/ci/prep-travis-forssh.sh \ | bash; From d0d59cf4f5beefdce89bab5faefdc85ddac7c2d4 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Fri, 18 Sep 2020 15:29:30 -0400 Subject: [PATCH 08/12] Use .dmg extension for FAT image on macOS --- scripts/ci/setup_crippledfs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/ci/setup_crippledfs b/scripts/ci/setup_crippledfs index ea1e42a..7b474b1 100755 --- a/scripts/ci/setup_crippledfs +++ b/scripts/ci/setup_crippledfs @@ -5,13 +5,13 @@ set -eu name="$1" size="$2" -image="/tmp/$name.img" - case `uname` in Linux) sudo apt-get update -qq sudo apt-get install dosfstools + image="/tmp/$name.img" + # VFAT FS in a box sudo dd if=/dev/zero "of=$image" "count=$size" bs=1M sudo mkfs.vfat "$image" @@ -22,6 +22,7 @@ case `uname` in sudo mount -o "uid=$(id -u),gid=$(id -g)" "$image" "$CRIPPLEDFS_PATH" ;; Darwin) + image="/tmp/$name.dmg" hdiutil create -megabytes "$size" -fs FAT32 -volname "$name" "$image" hdiutil attach "$image" CRIPPLEDFS_PATH="/Volumes/$name" From b68ff9c077bc6cdd247cfb974de2939694b793ca Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Fri, 18 Sep 2020 15:35:24 -0400 Subject: [PATCH 09/12] Tighten up request to GitHub API --- .github/workflows/build-git-annex.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index fbbf694..9d206ea 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -310,7 +310,7 @@ jobs: - name: install ${{ matrix.version }} datalad run: | if [ "${{ matrix.version }}" = "release" ]; then - commitish=$(curl -s https://api.github.com/repos/datalad/datalad/releases/latest | awk '/"tag_name"/{print $2}' | sed -e 's,[",],,g'); + commitish="$(curl -fsSL https://api.github.com/repos/datalad/datalad/releases/latest | jq -r .tag_name)" else commitish="${{ matrix.version }}"; fi From 9fd79852c358cd5e6eaaf3415e26aec6ac5db65f Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 21 Sep 2020 10:01:09 -0400 Subject: [PATCH 10/12] Add Authorization header to api.github.com request --- .github/workflows/build-git-annex.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index 9d206ea..e9fa273 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -310,7 +310,8 @@ jobs: - name: install ${{ matrix.version }} datalad run: | if [ "${{ matrix.version }}" = "release" ]; then - commitish="$(curl -fsSL https://api.github.com/repos/datalad/datalad/releases/latest | jq -r .tag_name)" + # Authorize so that we don't run up against low API rate limits + commitish="$(curl -fsSL -H "Authorization: bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/datalad/datalad/releases/latest | jq -r .tag_name)" else commitish="${{ matrix.version }}"; fi From 30cf193ba849dce22b8354f3cbd1f57810968953 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 21 Sep 2020 11:06:28 -0400 Subject: [PATCH 11/12] Pass GitHub API token to docker-machine --- .github/workflows/build-git-annex.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index e9fa273..0a0316b 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -287,7 +287,7 @@ jobs: if [ "${{ runner.os }}" = macOS ]; then # coreutils provides a readlink that supports `-f` brew install coreutils docker docker-machine - docker-machine create --driver virtualbox default + docker-machine --github-api-token="${{ secrets.GITHUB_TOKEN }}" create --driver virtualbox default eval "$(docker-machine env default)" export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" fi From 2779ff3ad3071e54e31567200b83378ea246c06d Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 21 Sep 2020 16:57:46 -0400 Subject: [PATCH 12/12] Disable testing with datalad on macOS --- .github/workflows/build-git-annex.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-git-annex.yaml b/.github/workflows/build-git-annex.yaml index 0a0316b..18ede84 100644 --- a/.github/workflows/build-git-annex.yaml +++ b/.github/workflows/build-git-annex.yaml @@ -245,7 +245,8 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest + # TODO: Re-enable macOS testing once it passes reliably + #- macos-latest version: [master, maint, release] fail-fast: false