From 2858ad56ebf06b2861dcdcb5d8e17c741f3cdda7 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:02:38 -0400 Subject: [PATCH 01/22] re-test on Mac 14.x (Sonoma) Ruby 3.1.4 + Rust 1.72.1 (WASM OK) Signed-off-by: Kingdon Barrett --- Gemfile | 1 + Gemfile.lock | 1 + lib/Makefile | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 9e87e09..47e2a16 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } +# ruby '3.3.0' # ruby '3.2.2' ruby '3.1.4' # ruby "3.0.6" diff --git a/Gemfile.lock b/Gemfile.lock index 0cd0208..079596d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -402,6 +402,7 @@ GEM PLATFORMS arm64-darwin-22 + arm64-darwin-23 x86_64-linux DEPENDENCIES diff --git a/lib/Makefile b/lib/Makefile index 165bfe7..055cc4b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -4,7 +4,7 @@ all: stat.wasm test test: stat.wasm ruby test.rb stat.raw.wasm: stat/src/main.rs - cd stat && cargo build --release --target wasm32-wasi && \ + cd stat && cargo +1.72.1 build --release --target wasm32-wasi && \ cp -f target/wasm32-wasi/release/stat.wasm ../stat.raw.wasm wasm-strip stat.raw.wasm From 52a03badd77b88a9fc2c63e18b170da95514cd97 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:09:57 -0400 Subject: [PATCH 02/22] fix toolchain, update WABT & Binaryen Signed-off-by: Kingdon Barrett --- .github/workflows/publish.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6a781fa..11e2682 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -30,8 +30,8 @@ env: BASE_TAG: base GEMS_TAG: gems GEM_CACHE_TAG: gem-cache - WABT_VERSION: 1.0.33 - BINARYEN_VERSION: "116" + WABT_VERSION: 1.0.34 + BINARYEN_VERSION: "117" jobs: release: @@ -68,6 +68,7 @@ jobs: if: "${{ github.event.inputs.dockerTarget == 'base'}}" with: cache: false + toolchain: 1.72.1 target: wasm32-wasi - name: Set up Rust cache From acfdaefc281de2eeca38165c22910e11d23bbdc2 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:12:04 -0400 Subject: [PATCH 03/22] version 0.2.2 Signed-off-by: Kingdon Barrett --- lib/templates/version.yml.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/templates/version.yml.erb b/lib/templates/version.yml.erb index b18e0e6..84c319f 100644 --- a/lib/templates/version.yml.erb +++ b/lib/templates/version.yml.erb @@ -5,7 +5,7 @@ major: 0 minor: 2 -patch: 1 +patch: 2 # meta: rc.1 # milestone: 4 build: <%= `git rev-list HEAD|wc -l`.strip %> From 7ed5a32eb18cbe29acf01765912fe588edcc649a Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:14:23 -0400 Subject: [PATCH 04/22] version 0.2.2 (make set-version) Signed-off-by: Kingdon Barrett --- config/version.yml | 6 +++--- deploy/overlays/production/kustomization.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/version.yml b/config/version.yml index d54cd0e..9bed5df 100644 --- a/config/version.yml +++ b/config/version.yml @@ -5,13 +5,13 @@ major: 0 minor: 2 -patch: 1 +patch: 2 # meta: rc.1 # milestone: 4 -build: 304 +build: 308 committer: Kingdon Barrett -build_date: 2023-10-29 +build_date: 2024-03-28 diff --git a/deploy/overlays/production/kustomization.yaml b/deploy/overlays/production/kustomization.yaml index d92bc69..7b85926 100644 --- a/deploy/overlays/production/kustomization.yaml +++ b/deploy/overlays/production/kustomization.yaml @@ -10,5 +10,5 @@ resources: images: - name: ghcr.io/kingdonb/stats-tracker-ghcr newName: ghcr.io/kingdonb/stats-tracker-ghcr - newTag: 0.2.1 + newTag: 0.2.2 patches: [] From 984775684e4d96a18e2d8914abbec45daade220d Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:20:59 -0400 Subject: [PATCH 05/22] fix versions across workflows Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 7 ++++--- .github/workflows/publish-tag.yaml | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index f062da2..e4d6eb6 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -29,8 +29,8 @@ env: BASE_TAG: base GEMS_TAG: gems GEM_CACHE_TAG: gem-cache - WABT_VERSION: 1.0.33 - BINARYEN_VERSION: "116" + WABT_VERSION: 1.0.34 + BINARYEN_VERSION: "117" DOCKER_TARGET: deploy CACHE_TAG: gems @@ -67,8 +67,9 @@ jobs: - name: Set up Rust uses: actions-rust-lang/setup-rust-toolchain@v1 - if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: + cache: false + toolchain: 1.72.1 target: wasm32-wasi - name: Add local bin to path (wasm-strip, wasm-opt) diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index fbef48c..786d137 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -9,8 +9,8 @@ env: BASE_TAG: base GEMS_TAG: gems GEM_CACHE_TAG: gem-cache - WABT_VERSION: 1.0.33 - BINARYEN_VERSION: "116" + WABT_VERSION: 1.0.34 + BINARYEN_VERSION: "117" jobs: release: @@ -59,6 +59,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: cache: false + toolchain: 1.72.1 target: wasm32-wasi - name: Set up Rust cache From bf0a7d68af9fcd9ed0f698b53a0d221d1fdf83b0 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:30:53 -0400 Subject: [PATCH 06/22] pin bumpalo @ 3.14.0 https://stackoverflow.com/questions/27770031/how-do-i-pin-indirect-dependencies-of-a-crate Signed-off-by: Kingdon Barrett --- lib/stat/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/stat/Cargo.toml b/lib/stat/Cargo.toml index fd9d96f..a97cf35 100644 --- a/lib/stat/Cargo.toml +++ b/lib/stat/Cargo.toml @@ -9,3 +9,4 @@ edition = "2021" [dependencies] lib-stat = { path = "lib-stat" } +bumpalo = "3.14.0" From 82ff8008d39ce49ce805de3c7565b8ff69514bf1 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:38:57 -0400 Subject: [PATCH 07/22] update all GitHub Actions Workflows Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 12 ++++++------ .github/workflows/execute.yaml | 6 +++--- .github/workflows/publish.yaml | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index e4d6eb6..2f57293 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -50,17 +50,17 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby - uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 + uses: ruby/setup-ruby@v1 if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: ruby-version: '3.1.4' @@ -80,7 +80,7 @@ jobs: echo "${HOME}/.local/bin" >> $GITHUB_PATH - name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v5 id: cache-restore if: "${{ github.event.inputs.dockerTarget != 'base' }}" with: @@ -88,7 +88,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache@v3 + uses: actions/cache@v5 id: cache if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: @@ -123,7 +123,7 @@ jobs: cp "${HOME}/.local/bin/stat.wasm" lib/stat.wasm - name: Build and push canary - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget != 'base'}}" with: context: . diff --git a/.github/workflows/execute.yaml b/.github/workflows/execute.yaml index 6f5c70a..f35b70d 100644 --- a/.github/workflows/execute.yaml +++ b/.github/workflows/execute.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -26,13 +26,13 @@ jobs: echo LATEST_TAG=$LATEST_TAG >> $GITHUB_OUTPUT - name: Set up Ruby - uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 + uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.4' bundler-cache: true - name: Setup Kubernetes - uses: helm/kind-action@v1.8.0 + uses: helm/kind-action@v1.9.0 with: cluster_name: stats diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 11e2682..e337d99 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -41,24 +41,24 @@ jobs: packages: write steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby - uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 + uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.4' bundler-cache: true @@ -86,7 +86,7 @@ jobs: echo "${HOME}/.local/bin" >> $GITHUB_PATH - name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v5 id: cache-restore if: "${{ github.event.inputs.dockerTarget != 'base' }}" with: @@ -94,7 +94,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache@v3 + uses: actions/cache@v5 id: cache if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: @@ -156,7 +156,7 @@ jobs: cache-to: type=gha,mode=max - name: Build and push gems - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget == 'gems'}}" with: context: . @@ -173,7 +173,7 @@ jobs: CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }} - name: Build and push gem-cache - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget == 'gem-cache'}}" with: context: . @@ -190,7 +190,7 @@ jobs: CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }} - name: Make clean-cache - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget == 'clean-cache'}}" with: context: . @@ -207,7 +207,7 @@ jobs: # CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }} - name: Build and push canary - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget == 'deploy'}}" with: context: . From 4eb8ae6f7a192123ab4bb53d5fc03d284ed5f43f Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:41:26 -0400 Subject: [PATCH 08/22] actions/cache@v4 there is no cache@v5 today Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 2 +- .github/workflows/publish.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 2f57293..4392c04 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -88,7 +88,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache@v5 + uses: actions/cache@v4 id: cache if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e337d99..94d57d1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -86,7 +86,7 @@ jobs: echo "${HOME}/.local/bin" >> $GITHUB_PATH - name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache/restore@v5 + uses: actions/cache/restore@v4 id: cache-restore if: "${{ github.event.inputs.dockerTarget != 'base' }}" with: @@ -94,7 +94,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache@v5 + uses: actions/cache@v4 id: cache if: "${{ github.event.inputs.dockerTarget == 'base' }}" with: From 79bdf7dd40575a94f89d19309c4278ed482097e4 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:42:28 -0400 Subject: [PATCH 09/22] ahem cache@v4 Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 4392c04..1b41821 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -80,7 +80,7 @@ jobs: echo "${HOME}/.local/bin" >> $GITHUB_PATH - name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm - uses: actions/cache/restore@v5 + uses: actions/cache/restore@v4 id: cache-restore if: "${{ github.event.inputs.dockerTarget != 'base' }}" with: From e25b42f054d6d899f0c52ee99b177747f36c5db5 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:49:24 -0400 Subject: [PATCH 10/22] move dependency into library slightly more specific https://stackoverflow.com/a/27770160/661659 "Addressing the Bounty" Signed-off-by: Kingdon Barrett --- lib/stat/Cargo.toml | 1 - lib/stat/lib-stat/Cargo.toml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stat/Cargo.toml b/lib/stat/Cargo.toml index a97cf35..fd9d96f 100644 --- a/lib/stat/Cargo.toml +++ b/lib/stat/Cargo.toml @@ -9,4 +9,3 @@ edition = "2021" [dependencies] lib-stat = { path = "lib-stat" } -bumpalo = "3.14.0" diff --git a/lib/stat/lib-stat/Cargo.toml b/lib/stat/lib-stat/Cargo.toml index 5a02b7e..ccd9697 100644 --- a/lib/stat/lib-stat/Cargo.toml +++ b/lib/stat/lib-stat/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] scraper = "0.16.0" wasm-bindgen = "0.2.84" +bumpalo = "=3.14.0" [lib] crate-type = ["lib", "cdylib"] From 0ae51d218e8030635a7d50d38fba795740ed4324 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:51:35 -0400 Subject: [PATCH 11/22] add Rust to CI (v1.72.1) Signed-off-by: Kingdon Barrett --- .github/workflows/ci.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d16c7a9..658bcb3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,12 +23,18 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + cache: false + toolchain: 1.72.1 + target: wasm32-wasi + - uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.4 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Install dependent libraries run: sudo apt-get install libpq-dev From a71d9f6e344a0e6b6c6c5cb451b9992405b23a0e Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 12:55:44 -0400 Subject: [PATCH 12/22] setup-wabt@v1.0.6 this is a custom workflow (do not borrow it if you don't want me to break your shit) Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 2 +- .github/workflows/publish-tag.yaml | 2 +- .github/workflows/publish.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 1b41821..9d75214 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -96,7 +96,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Install wabt, binaryen - uses: kingdonb/setup-wabt@v1.0.5 + uses: kingdonb/setup-wabt@v1.0.6 if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}" with: version: ${{ env.WABT_VERSION }} diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index 786d137..2440a6d 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -75,7 +75,7 @@ jobs: echo "${HOME}/.local/bin" >> $GITHUB_PATH - name: Install wabt, binaryen - uses: kingdonb/setup-wabt@v1.0.5 + uses: kingdonb/setup-wabt@v1.0.6 with: version: ${{ env.WABT_VERSION }} version2: ${{ env.BINARYEN_VERSION }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 94d57d1..84af9bb 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -102,7 +102,7 @@ jobs: key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} - name: Install wabt, binaryen - uses: kingdonb/setup-wabt@v1.0.5 + uses: kingdonb/setup-wabt@v1.0.6 if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}" with: version: ${{ env.WABT_VERSION }} From d9e7347df59260e194ccd06a939d72a834332a9a Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 13:21:09 -0400 Subject: [PATCH 13/22] move Rust setup, Rust cache before Ruby Signed-off-by: Kingdon Barrett --- .github/workflows/publish-tag.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index 2440a6d..dc1818f 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -37,6 +37,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + cache: false + toolchain: 1.72.1 + target: wasm32-wasi + + - name: Set up Rust cache + uses: Swatinem/rust-cache@v2 + with: + workspaces: | + lib/stat + - name: Set up Ruby uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 with: @@ -55,19 +68,6 @@ jobs: echo BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> $GITHUB_OUTPUT echo IMAGE_TAG=${CFGTAG} >> $GITHUB_OUTPUT - - name: Set up Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - cache: false - toolchain: 1.72.1 - target: wasm32-wasi - - - name: Set up Rust cache - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - lib/stat - - name: Add local bin to path (wasm-strip, wasm-opt) shell: bash run: | From 63d430374bdd55e0d4193a96d983dee1b7958d4a Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 13:34:06 -0400 Subject: [PATCH 14/22] Update docker/build-push-action Signed-off-by: Kingdon Barrett --- .github/workflows/publish-tag.yaml | 2 +- .github/workflows/publish.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index dc1818f..d98586c 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -93,7 +93,7 @@ jobs: cp lib/stat.wasm "${HOME}/.local/bin" - name: Build and push tag - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 84af9bb..bb7adec 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -141,7 +141,7 @@ jobs: cp "${HOME}/.local/bin/stat.wasm" lib/stat.wasm - name: Build and push base - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget == 'base'}}" with: context: . From aada115aa5ed2f6cf3e1b9b27941bc05a0da547d Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 13:35:08 -0400 Subject: [PATCH 15/22] bundle update --bundler Signed-off-by: Kingdon Barrett --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 079596d..7c06c65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -454,4 +454,4 @@ RUBY VERSION ruby 3.1.4p223 BUNDLED WITH - 2.4.14 + 2.5.7 From 64dc70af9e2d7003a736b1540d25164f6fb99ac6 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 13:36:08 -0400 Subject: [PATCH 16/22] Dockerfile update (bundler) Signed-off-by: Kingdon Barrett --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2a1dba2..6058d4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN echo -n "---\nBUNDLE_PATH: \"/usr/local/bundle\"" > /usr/local/bundle/config FROM $BASE_IMAGE AS base RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN mkdir -p /usr/local/bundle -RUN gem install bundler:2.4.14 && gem install foreman +RUN gem install bundler:2.5.7 && gem install foreman WORKDIR /usr/src/app RUN mkdir -p /usr/src/app/lib From 8af93bea0c6bc41e3ea831a1f2703fcad5301e53 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 13:55:22 -0400 Subject: [PATCH 17/22] Free disk space https://github.com/kingdonb/stats-tracker-ghcr/actions/runs/8471469779 https://github.com/orgs/community/discussions/25678 Signed-off-by: Kingdon Barrett --- .github/workflows/publish-tag.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index d98586c..33a2ba3 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -92,6 +92,35 @@ jobs: make -C lib stat.wasm cp lib/stat.wasm "${HOME}/.local/bin" + # Copied from: https://github.com/orgs/community/discussions/25678 + # https://github.com/apache/flink/blob/02d30ace69dc18555a5085eccf70ee884e73a16e/tools/azure-pipelines/free_disk_space.sh + # Fixes: + # https://github.com/kingdonb/stats-tracker-ghcr/actions/runs/8471469779 + # (release System.IO.IOException: No space left on device) + # You are running out of disk space. + - name: Free disk space + shell: bash + run: | + echo "==============================================================================" + echo "Freeing up disk space on CI system" + echo "==============================================================================" + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + df -h + echo "Removing large packages" + sudo apt-get remove -y '^ghc-8.*' + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + # deleting 15GB + rm -rf /usr/share/dotnet/ + df -h + - name: Build and push tag uses: docker/build-push-action@v5 with: From 838951ec73316babbded1830b8ed64dbb5c8b925 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 14:02:42 -0400 Subject: [PATCH 18/22] ghc-8 is not installed Signed-off-by: Kingdon Barrett --- .github/workflows/publish-tag.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index 33a2ba3..6e28fcb 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -21,14 +21,14 @@ jobs: packages: write # needed for ghcr access steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -51,7 +51,7 @@ jobs: lib/stat - name: Set up Ruby - uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 + uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.4' bundler-cache: true @@ -108,7 +108,7 @@ jobs: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 df -h echo "Removing large packages" - sudo apt-get remove -y '^ghc-8.*' + # sudo apt-get remove -y '^ghc-8.*' sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' From a1ffd0c53ec3f3ffc935736fa8e83c5681f93351 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 14:04:45 -0400 Subject: [PATCH 19/22] test in develop workflow Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 9d75214..276c995 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -122,6 +122,29 @@ jobs: run: | cp "${HOME}/.local/bin/stat.wasm" lib/stat.wasm + - name: Free disk space + shell: bash + run: | + echo "==============================================================================" + echo "Freeing up disk space on CI system" + echo "==============================================================================" + echo "Listing 100 largest packages" + dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 + df -h + echo "Removing large packages" + # sudo apt-get remove -y '^ghc-8.*' + sudo apt-get remove -y '^dotnet-.*' + sudo apt-get remove -y '^llvm-.*' + sudo apt-get remove -y 'php.*' + sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel + sudo apt-get autoremove -y + sudo apt-get clean + df -h + echo "Removing large directories" + # deleting 15GB + rm -rf /usr/share/dotnet/ + df -h + - name: Build and push canary uses: docker/build-push-action@v5 if: "${{ github.event.inputs.dockerTarget != 'base'}}" From 46f10da748f8863bb98fe51e67135b7a3d4f4976 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 14:06:36 -0400 Subject: [PATCH 20/22] update develop workflows Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 276c995..0fdd3a7 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -43,11 +43,11 @@ jobs: packages: write # needed for ghcr access steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to GHCR uses: docker/login-action@v3 From 75e6787ca77884d29c90e57d4b43366e19209ea0 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 14:09:06 -0400 Subject: [PATCH 21/22] ci develop (fix) Package 'google-cloud-sdk' is not installed, so not removed Error: Process completed with exit code 100. Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 0fdd3a7..74253d1 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -136,7 +136,7 @@ jobs: sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel + sudo apt-get remove -y azure-cli hhvm google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean df -h From 493b694def470c82b974076fd4bfaabb6fa71c27 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 28 Mar 2024 14:12:32 -0400 Subject: [PATCH 22/22] sync between develop and publish-tag Signed-off-by: Kingdon Barrett --- .github/workflows/develop.yaml | 2 +- .github/workflows/publish-tag.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 74253d1..cffa491 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -136,7 +136,7 @@ jobs: sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli hhvm google-chrome-stable firefox powershell mono-devel + sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean df -h diff --git a/.github/workflows/publish-tag.yaml b/.github/workflows/publish-tag.yaml index 6e28fcb..7283c6b 100644 --- a/.github/workflows/publish-tag.yaml +++ b/.github/workflows/publish-tag.yaml @@ -112,7 +112,7 @@ jobs: sudo apt-get remove -y '^dotnet-.*' sudo apt-get remove -y '^llvm-.*' sudo apt-get remove -y 'php.*' - sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel + sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel sudo apt-get autoremove -y sudo apt-get clean df -h