From 8dc2ed0707d0df1262ef46c7fa497fb08751bf10 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Thu, 4 Jan 2024 16:44:57 -0500 Subject: [PATCH 01/10] bump to 1.21.5 --- .github/workflows/build.yml | 13 ------------- cli/go.mod | 2 +- docker/builder/Dockerfile.ubuntu | 8 ++++++-- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8dcd0284..734dcb5b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -193,19 +193,6 @@ jobs: key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-buildx-${{ github.sha }} upload-chunk-size: 1000000 - # Cache downloaded Go dependencies. - - name: Setup Go Cache - uses: actions/cache@v3.3.2 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - cli/.gobin - cli/.gocache - cli/.gomod - key: ${{ runner.os }}-${{ steps.env.outputs.arch }}-go-${{ hashFiles('cli/go.sum') }} - upload-chunk-size: 1000000 - # Cache the cmocka build. Use a key based on a hash of all the files used # in the build. - name: Setup cmocka Cache diff --git a/cli/go.mod b/cli/go.mod index 2a44b1371..8cf3153ed 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -1,6 +1,6 @@ module github.com/criblio/scope -go 1.21.4 +go 1.21.5 replace github.com/olekukonko/tablewriter => github.com/cockroachdb/tablewriter v0.0.5-0.20200105123400-bd15540e8847 diff --git a/docker/builder/Dockerfile.ubuntu b/docker/builder/Dockerfile.ubuntu index d06835a95..2fd4cf8f3 100644 --- a/docker/builder/Dockerfile.ubuntu +++ b/docker/builder/Dockerfile.ubuntu @@ -38,11 +38,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV key=52B59B1571A79DBC054901C0F6BC817356A3D45E RUN apt-get update && \ apt-get install -y software-properties-common gpg apt-utils libelf-dev && \ - add-apt-repository -y ppa:longsleep/golang-backports && \ apt-get update && \ # ( gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" ) && \ apt-get install -y \ - golang \ autoconf \ automake \ curl \ @@ -61,6 +59,12 @@ RUN apt-get update && \ dpkg-reconfigure --frontend noninteractive tzdata && \ apt-get clean +# Install Go +RUN curl -LO https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && \ + rm -rf /usr/local/go && \ + tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz +ENV PATH "$PATH:/usr/local/go/bin" + ARG UPX_VERSION=4.0.1 ARG CMAKE_VERSION=3.24.3 From b16d4aa3a2b1e5bd271c5a8d6e5d1fc0ffb5f464 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Thu, 4 Jan 2024 16:51:05 -0500 Subject: [PATCH 02/10] update apt deps --- docker/builder/Dockerfile.ubuntu | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/builder/Dockerfile.ubuntu b/docker/builder/Dockerfile.ubuntu index 2fd4cf8f3..e0da29579 100644 --- a/docker/builder/Dockerfile.ubuntu +++ b/docker/builder/Dockerfile.ubuntu @@ -43,6 +43,7 @@ RUN apt-get update && \ apt-get install -y \ autoconf \ automake \ + build-essential \ curl \ emacs \ gdb \ From 040fb9b211277e8c40b9bd125002c349cebf5743 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 12:52:20 -0500 Subject: [PATCH 03/10] golang in dockerfile --- .github/workflows/build.yml | 2 +- .github/workflows/integrations.yml | 2 +- docker/builder/Dockerfile.ubuntu | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 734dcb5b7..a0eceb8c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -319,7 +319,7 @@ jobs: # artifact name for this job as well as the other job for ARM. The result # is a single artifact with binaries from both jobs. - name: Upload Binaries - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: binaries path: | diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 78b590bd7..8425f1baf 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -293,7 +293,7 @@ jobs: # artifact name for this job as well as the other job for ARM. The result # is a single artifact with binaries from both jobs. - name: Upload Binaries - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: binaries path: | diff --git a/docker/builder/Dockerfile.ubuntu b/docker/builder/Dockerfile.ubuntu index e0da29579..9e357f530 100644 --- a/docker/builder/Dockerfile.ubuntu +++ b/docker/builder/Dockerfile.ubuntu @@ -38,16 +38,17 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV key=52B59B1571A79DBC054901C0F6BC817356A3D45E RUN apt-get update && \ apt-get install -y software-properties-common gpg apt-utils libelf-dev && \ + add-apt-repository -y ppa:longsleep/golang-backports && \ apt-get update && \ # ( gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" ) && \ apt-get install -y \ autoconf \ automake \ - build-essential \ curl \ emacs \ gdb \ git \ + golang \ lcov \ libtool \ lsof \ From eb61c44e2cde15a7ae82bde34b4181c961def223 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 13:00:47 -0500 Subject: [PATCH 04/10] rollback artifact --- .github/workflows/build.yml | 8 ++++---- .github/workflows/integrations.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0eceb8c7..52bbd6719 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -355,7 +355,7 @@ jobs: # Download the built binaries - name: Download Binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: binaries @@ -458,7 +458,7 @@ jobs: # uses: actions/checkout@v4 # # - name: Download Binaries - # uses: actions/download-artifact@v4 + # uses: actions/download-artifact@v3 # with: # name: binaries # @@ -506,7 +506,7 @@ jobs: # uses: actions/checkout@v4 # # - name: Download Binaries - # uses: actions/download-artifact@v4 + # uses: actions/download-artifact@v3 # with: # name: binaries # @@ -564,7 +564,7 @@ jobs: password: ${{ secrets.SCOPECI_TOKEN }} - name: Download Binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: binaries diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 8425f1baf..dfc7cda5e 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -327,7 +327,7 @@ jobs: uses: actions/checkout@v4 - name: Download Binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: binaries @@ -375,7 +375,7 @@ jobs: uses: actions/checkout@v4 - name: Download Binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: binaries From b6ecd24023e50a6e415bdf0660a237ea3c8c226c Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 13:38:19 -0500 Subject: [PATCH 05/10] remove go from bin --- docker/builder/Dockerfile.ubuntu | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/builder/Dockerfile.ubuntu b/docker/builder/Dockerfile.ubuntu index 9e357f530..d900c4286 100644 --- a/docker/builder/Dockerfile.ubuntu +++ b/docker/builder/Dockerfile.ubuntu @@ -63,6 +63,7 @@ RUN apt-get update && \ # Install Go RUN curl -LO https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && \ + rm -rf /usr/bin/go && \ rm -rf /usr/local/go && \ tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz ENV PATH "$PATH:/usr/local/go/bin" From e7f22ecaa8a55f31c3b482521e5f0369184f12b5 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 14:12:28 -0500 Subject: [PATCH 06/10] qemu fix --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f4164dd9..676173467 100644 --- a/Makefile +++ b/Makefile @@ -229,7 +229,9 @@ require-docker-buildx: require-docker # see https://github.com/multiarch/qemu-user-static require-qemu-binfmt: require-docker @[ -n "$(wildcard /proc/sys/fs/binfmt_misc/qemu-*)" ] || \ - docker run --rm --privileged tonistiigi/binfmt:latest --install all + docker run --rm --privileged tonistiigi/binfmt:latest --install all && \ + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes + # fail of kind not in $PATH require-kind: From 4e815b682920f1a772a9ab139138e91c88f01e05 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 14:27:31 -0500 Subject: [PATCH 07/10] makefile --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 676173467..52d58523e 100644 --- a/Makefile +++ b/Makefile @@ -230,8 +230,7 @@ require-docker-buildx: require-docker require-qemu-binfmt: require-docker @[ -n "$(wildcard /proc/sys/fs/binfmt_misc/qemu-*)" ] || \ docker run --rm --privileged tonistiigi/binfmt:latest --install all && \ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes - + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes --platform $(ARCH) # fail of kind not in $PATH require-kind: From b479c4cea9312f783edfce7835c40990f6d0cfe2 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 14:35:40 -0500 Subject: [PATCH 08/10] restore qemu --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52d58523e..8f4164dd9 100644 --- a/Makefile +++ b/Makefile @@ -229,8 +229,7 @@ require-docker-buildx: require-docker # see https://github.com/multiarch/qemu-user-static require-qemu-binfmt: require-docker @[ -n "$(wildcard /proc/sys/fs/binfmt_misc/qemu-*)" ] || \ - docker run --rm --privileged tonistiigi/binfmt:latest --install all && \ - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes --platform $(ARCH) + docker run --rm --privileged tonistiigi/binfmt:latest --install all # fail of kind not in $PATH require-kind: From 58fc56ad832a970d2ba806bb98bdf46b3de5af98 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 16:12:38 -0500 Subject: [PATCH 09/10] test removing qemu from workflow --- .github/workflows/build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52bbd6719..dcc869416 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,13 +172,6 @@ jobs: username: scopeci password: ${{ secrets.SCOPECI_TOKEN }} - # This installs the `/proc/sys/fs/binfmt` entries that allow the CI host - # to build for other architectures under QEMU emulation. It's not really - # needed here since we're only building natively but we're leaving it in - # since it'll be done by our build system anyway. - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - # Start a BuildX builder. We'll use the outputs later so give it an ID. - name: Setup Docker Buildx id: buildx From d5869a9269d394475ecaa898a25ed9d7002f06a5 Mon Sep 17 00:00:00 2001 From: Sean Valeo Date: Fri, 5 Jan 2024 16:55:13 -0500 Subject: [PATCH 10/10] replace qemu wf --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcc869416..52bbd6719 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,6 +172,13 @@ jobs: username: scopeci password: ${{ secrets.SCOPECI_TOKEN }} + # This installs the `/proc/sys/fs/binfmt` entries that allow the CI host + # to build for other architectures under QEMU emulation. It's not really + # needed here since we're only building natively but we're leaving it in + # since it'll be done by our build system anyway. + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + # Start a BuildX builder. We'll use the outputs later so give it an ID. - name: Setup Docker Buildx id: buildx