From 44d74d7366f9d7c6ee20ed451770e72c68978b73 Mon Sep 17 00:00:00 2001 From: jtyoung84 <104453205+jtyoung84@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:59:39 -0700 Subject: [PATCH] ci: adds costum install script for Go --- .github/workflows/tag_and_publish.yml | 56 ++++++++++++++------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tag_and_publish.yml b/.github/workflows/tag_and_publish.yml index eb975cf..04dd412 100644 --- a/.github/workflows/tag_and_publish.yml +++ b/.github/workflows/tag_and_publish.yml @@ -65,41 +65,45 @@ jobs: SERVICE_TOKEN: ${{ secrets.SERVICE_TOKEN }} publish: runs-on: ubuntu-latest + env: + GO_VERSION: '1.14.12' + GO_OS: 'linux' + GO_ARCH: 'amd64' + SINGULARITY_VERSION: '3.7.0' needs: tag steps: - uses: actions/checkout@v3 - name: Pull latest changes run: git pull origin main - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - name: Install Dependencies + - name: Install dependencies run: | sudo apt-get update && sudo apt-get install -y \ - build-essential \ - libssl-dev \ - uuid-dev \ - libgpgme11-dev \ - squashfs-tools \ - libseccomp-dev \ - pkg-config + build-essential \ + libssl-dev \ + uuid-dev \ + libgpgme11-dev \ + squashfs-tools \ + libseccomp-dev \ + wget \ + pkg-config \ + procps + - name: Install GO + run: | + wget https://dl.google.com/go/go$GO_VERSION.$GO_OS-$GO_ARCH.tar.gz + tar -C /usr/local -xzvf go$GO_VERSION.$GO_OS-$GO_ARCH.tar.gz + rm go$GO_VERSION.$GO_OS-$GO_ARCH.tar.gz + echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile - name: Install Singularity - env: - SINGULARITY_VERSION: 3.7.0 - GOPATH: /tmp/go run: | - mkdir -p $GOPATH - sudo mkdir -p /usr/local/var/singularity/mnt && \ - mkdir -p $GOPATH/src/github.com/sylabs && \ - cd $GOPATH/src/github.com/sylabs && \ - wget -qO- https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz | \ - tar xzv && \ - cd singularity-ce-${SINGULARITY_VERSION} && \ - ./mconfig -p /usr/local && \ - make -C builddir && \ - sudo make -C builddir install + wget https://github.com/hpcng/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-${SINGULARITY_VERSION}.tar.gz + tar -xzf singularity-${SINGULARITY_VERSION}.tar.gz + rm singularity-${SINGULARITY_VERSION}.tar.gz + export PATH=$PATH:/usr/local/go/bin + cd singularity + ./mconfig --without-suid + make -C ./builddir + sudo make -C ./builddir install + cd .. - name: Build sif container run: | mkdir aind-data-transformation/build