Skip to content

Commit 040b83d

Browse files
committed
Merge branch 'main' into last-release
2 parents 6ee0223 + 493b694 commit 040b83d

File tree

13 files changed

+123
-59
lines changed

13 files changed

+123
-59
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525

26+
- name: Set up Rust
27+
uses: actions-rust-lang/setup-rust-toolchain@v1
28+
with:
29+
cache: false
30+
toolchain: 1.72.1
31+
target: wasm32-wasi
32+
2633
- uses: ruby/setup-ruby@v1
2734
with:
2835
ruby-version: 3.1.4
2936
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3037

31-
3238
- name: Install dependent libraries
3339
run: sudo apt-get install libpq-dev
3440

.github/workflows/develop.yaml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ env:
2929
BASE_TAG: base
3030
GEMS_TAG: gems
3131
GEM_CACHE_TAG: gem-cache
32-
WABT_VERSION: 1.0.33
33-
BINARYEN_VERSION: "116"
32+
WABT_VERSION: 1.0.34
33+
BINARYEN_VERSION: "117"
3434
DOCKER_TARGET: deploy
3535
CACHE_TAG: gems
3636

@@ -43,32 +43,33 @@ jobs:
4343
packages: write # needed for ghcr access
4444
steps:
4545
- name: Set up QEMU
46-
uses: docker/setup-qemu-action@v2
46+
uses: docker/setup-qemu-action@v3
4747

4848
- name: Set up Docker Buildx
4949
id: buildx
50-
uses: docker/setup-buildx-action@v2
50+
uses: docker/setup-buildx-action@v3
5151

5252
- name: Login to GHCR
53-
uses: docker/login-action@v2
53+
uses: docker/login-action@v3
5454
with:
5555
registry: ghcr.io
5656
username: ${{ github.actor }}
5757
password: ${{ secrets.GITHUB_TOKEN }}
5858

5959
- name: Checkout
60-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
6161

6262
- name: Set up Ruby
63-
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484
63+
uses: ruby/setup-ruby@v1
6464
if: "${{ github.event.inputs.dockerTarget == 'base' }}"
6565
with:
6666
ruby-version: '3.1.4'
6767

6868
- name: Set up Rust
6969
uses: actions-rust-lang/setup-rust-toolchain@v1
70-
if: "${{ github.event.inputs.dockerTarget == 'base' }}"
7170
with:
71+
cache: false
72+
toolchain: 1.72.1
7273
target: wasm32-wasi
7374

7475
- name: Add local bin to path (wasm-strip, wasm-opt)
@@ -79,23 +80,23 @@ jobs:
7980
echo "${HOME}/.local/bin" >> $GITHUB_PATH
8081
8182
- name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm
82-
uses: actions/cache/restore@v3
83+
uses: actions/cache/restore@v4
8384
id: cache-restore
8485
if: "${{ github.event.inputs.dockerTarget != 'base' }}"
8586
with:
8687
path: "/home/runner/.local/bin"
8788
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }}
8889

8990
- name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm
90-
uses: actions/cache@v3
91+
uses: actions/cache@v4
9192
id: cache
9293
if: "${{ github.event.inputs.dockerTarget == 'base' }}"
9394
with:
9495
path: "/home/runner/.local/bin"
9596
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }}
9697

9798
- name: Install wabt, binaryen
98-
uses: kingdonb/[email protected].5
99+
uses: kingdonb/[email protected].6
99100
if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}"
100101
with:
101102
version: ${{ env.WABT_VERSION }}
@@ -121,8 +122,31 @@ jobs:
121122
run: |
122123
cp "${HOME}/.local/bin/stat.wasm" lib/stat.wasm
123124
125+
- name: Free disk space
126+
shell: bash
127+
run: |
128+
echo "=============================================================================="
129+
echo "Freeing up disk space on CI system"
130+
echo "=============================================================================="
131+
echo "Listing 100 largest packages"
132+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
133+
df -h
134+
echo "Removing large packages"
135+
# sudo apt-get remove -y '^ghc-8.*'
136+
sudo apt-get remove -y '^dotnet-.*'
137+
sudo apt-get remove -y '^llvm-.*'
138+
sudo apt-get remove -y 'php.*'
139+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel
140+
sudo apt-get autoremove -y
141+
sudo apt-get clean
142+
df -h
143+
echo "Removing large directories"
144+
# deleting 15GB
145+
rm -rf /usr/share/dotnet/
146+
df -h
147+
124148
- name: Build and push canary
125-
uses: docker/build-push-action@v4
149+
uses: docker/build-push-action@v5
126150
if: "${{ github.event.inputs.dockerTarget != 'base'}}"
127151
with:
128152
context: .

.github/workflows/execute.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

@@ -26,13 +26,13 @@ jobs:
2626
echo LATEST_TAG=$LATEST_TAG >> $GITHUB_OUTPUT
2727
2828
- name: Set up Ruby
29-
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484
29+
uses: ruby/setup-ruby@v1
3030
with:
3131
ruby-version: '3.1.4'
3232
bundler-cache: true
3333

3434
- name: Setup Kubernetes
35-
uses: helm/kind-action@v1.8.0
35+
uses: helm/kind-action@v1.9.0
3636
with:
3737
cluster_name: stats
3838

.github/workflows/publish-tag.yaml

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ env:
99
BASE_TAG: base
1010
GEMS_TAG: gems
1111
GEM_CACHE_TAG: gem-cache
12-
WABT_VERSION: 1.0.33
13-
BINARYEN_VERSION: "116"
12+
WABT_VERSION: 1.0.34
13+
BINARYEN_VERSION: "117"
1414

1515
jobs:
1616
release:
@@ -21,14 +21,14 @@ jobs:
2121
packages: write # needed for ghcr access
2222
steps:
2323
- name: Set up QEMU
24-
uses: docker/setup-qemu-action@v2
24+
uses: docker/setup-qemu-action@v3
2525

2626
- name: Set up Docker Buildx
2727
id: buildx
28-
uses: docker/setup-buildx-action@v2
28+
uses: docker/setup-buildx-action@v3
2929

3030
- name: Login to GHCR
31-
uses: docker/login-action@v2
31+
uses: docker/login-action@v3
3232
with:
3333
registry: ghcr.io
3434
username: ${{ github.actor }}
@@ -37,8 +37,21 @@ jobs:
3737
- name: Checkout
3838
uses: actions/checkout@v4
3939

40+
- name: Set up Rust
41+
uses: actions-rust-lang/setup-rust-toolchain@v1
42+
with:
43+
cache: false
44+
toolchain: 1.72.1
45+
target: wasm32-wasi
46+
47+
- name: Set up Rust cache
48+
uses: Swatinem/rust-cache@v2
49+
with:
50+
workspaces: |
51+
lib/stat
52+
4053
- name: Set up Ruby
41-
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484
54+
uses: ruby/setup-ruby@v1
4255
with:
4356
ruby-version: '3.1.4'
4457
bundler-cache: true
@@ -55,26 +68,14 @@ jobs:
5568
echo BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> $GITHUB_OUTPUT
5669
echo IMAGE_TAG=${CFGTAG} >> $GITHUB_OUTPUT
5770
58-
- name: Set up Rust
59-
uses: actions-rust-lang/setup-rust-toolchain@v1
60-
with:
61-
cache: false
62-
target: wasm32-wasi
63-
64-
- name: Set up Rust cache
65-
uses: Swatinem/rust-cache@v2
66-
with:
67-
workspaces: |
68-
lib/stat
69-
7071
- name: Add local bin to path (wasm-strip, wasm-opt)
7172
shell: bash
7273
run: |
7374
mkdir -p "${HOME}/.local/bin"
7475
echo "${HOME}/.local/bin" >> $GITHUB_PATH
7576
7677
- name: Install wabt, binaryen
77-
uses: kingdonb/[email protected].5
78+
uses: kingdonb/[email protected].6
7879
with:
7980
version: ${{ env.WABT_VERSION }}
8081
version2: ${{ env.BINARYEN_VERSION }}
@@ -91,8 +92,37 @@ jobs:
9192
make -C lib stat.wasm
9293
cp lib/stat.wasm "${HOME}/.local/bin"
9394
95+
# Copied from: https://github.com/orgs/community/discussions/25678
96+
# https://github.com/apache/flink/blob/02d30ace69dc18555a5085eccf70ee884e73a16e/tools/azure-pipelines/free_disk_space.sh
97+
# Fixes:
98+
# https://github.com/kingdonb/stats-tracker-ghcr/actions/runs/8471469779
99+
# (release System.IO.IOException: No space left on device)
100+
# You are running out of disk space.
101+
- name: Free disk space
102+
shell: bash
103+
run: |
104+
echo "=============================================================================="
105+
echo "Freeing up disk space on CI system"
106+
echo "=============================================================================="
107+
echo "Listing 100 largest packages"
108+
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
109+
df -h
110+
echo "Removing large packages"
111+
# sudo apt-get remove -y '^ghc-8.*'
112+
sudo apt-get remove -y '^dotnet-.*'
113+
sudo apt-get remove -y '^llvm-.*'
114+
sudo apt-get remove -y 'php.*'
115+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel
116+
sudo apt-get autoremove -y
117+
sudo apt-get clean
118+
df -h
119+
echo "Removing large directories"
120+
# deleting 15GB
121+
rm -rf /usr/share/dotnet/
122+
df -h
123+
94124
- name: Build and push tag
95-
uses: docker/build-push-action@v4
125+
uses: docker/build-push-action@v5
96126
with:
97127
context: .
98128
platforms: linux/amd64,linux/arm64

.github/workflows/publish.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ env:
3030
BASE_TAG: base
3131
GEMS_TAG: gems
3232
GEM_CACHE_TAG: gem-cache
33-
WABT_VERSION: 1.0.33
34-
BINARYEN_VERSION: "116"
33+
WABT_VERSION: 1.0.34
34+
BINARYEN_VERSION: "117"
3535

3636
jobs:
3737
release:
@@ -41,24 +41,24 @@ jobs:
4141
packages: write
4242
steps:
4343
- name: Set up QEMU
44-
uses: docker/setup-qemu-action@v2
44+
uses: docker/setup-qemu-action@v3
4545

4646
- name: Set up Docker Buildx
4747
id: buildx
48-
uses: docker/setup-buildx-action@v2
48+
uses: docker/setup-buildx-action@v3
4949

5050
- name: Login to GHCR
51-
uses: docker/login-action@v2
51+
uses: docker/login-action@v3
5252
with:
5353
registry: ghcr.io
5454
username: ${{ github.actor }}
5555
password: ${{ secrets.GITHUB_TOKEN }}
5656

5757
- name: Checkout
58-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
5959

6060
- name: Set up Ruby
61-
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484
61+
uses: ruby/setup-ruby@v1
6262
with:
6363
ruby-version: '3.1.4'
6464
bundler-cache: true
@@ -68,6 +68,7 @@ jobs:
6868
if: "${{ github.event.inputs.dockerTarget == 'base'}}"
6969
with:
7070
cache: false
71+
toolchain: 1.72.1
7172
target: wasm32-wasi
7273

7374
- name: Set up Rust cache
@@ -85,23 +86,23 @@ jobs:
8586
echo "${HOME}/.local/bin" >> $GITHUB_PATH
8687
8788
- name: Restore Cache (binaries) wasm-opt, wasm-strip, stat.wasm
88-
uses: actions/cache/restore@v3
89+
uses: actions/cache/restore@v4
8990
id: cache-restore
9091
if: "${{ github.event.inputs.dockerTarget != 'base' }}"
9192
with:
9293
path: "/home/runner/.local/bin"
9394
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }}
9495

9596
- name: Cache (binaries) wasm-opt, wasm-strip, stat.wasm
96-
uses: actions/cache@v3
97+
uses: actions/cache@v4
9798
id: cache
9899
if: "${{ github.event.inputs.dockerTarget == 'base' }}"
99100
with:
100101
path: "/home/runner/.local/bin"
101102
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }}
102103

103104
- name: Install wabt, binaryen
104-
uses: kingdonb/[email protected].5
105+
uses: kingdonb/[email protected].6
105106
if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}"
106107
with:
107108
version: ${{ env.WABT_VERSION }}
@@ -140,7 +141,7 @@ jobs:
140141
cp "${HOME}/.local/bin/stat.wasm" lib/stat.wasm
141142
142143
- name: Build and push base
143-
uses: docker/build-push-action@v4
144+
uses: docker/build-push-action@v5
144145
if: "${{ github.event.inputs.dockerTarget == 'base'}}"
145146
with:
146147
context: .
@@ -155,7 +156,7 @@ jobs:
155156
cache-to: type=gha,mode=max
156157

157158
- name: Build and push gems
158-
uses: docker/build-push-action@v4
159+
uses: docker/build-push-action@v5
159160
if: "${{ github.event.inputs.dockerTarget == 'gems'}}"
160161
with:
161162
context: .
@@ -172,7 +173,7 @@ jobs:
172173
CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }}
173174
174175
- name: Build and push gem-cache
175-
uses: docker/build-push-action@v4
176+
uses: docker/build-push-action@v5
176177
if: "${{ github.event.inputs.dockerTarget == 'gem-cache'}}"
177178
with:
178179
context: .
@@ -189,7 +190,7 @@ jobs:
189190
CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }}
190191
191192
- name: Make clean-cache
192-
uses: docker/build-push-action@v4
193+
uses: docker/build-push-action@v5
193194
if: "${{ github.event.inputs.dockerTarget == 'clean-cache'}}"
194195
with:
195196
context: .
@@ -206,7 +207,7 @@ jobs:
206207
# CACHE_IMAGE=${{ env.IMAGE_TAG }}:${{ github.event.inputs.cacheTag }}
207208

208209
- name: Build and push canary
209-
uses: docker/build-push-action@v4
210+
uses: docker/build-push-action@v5
210211
if: "${{ github.event.inputs.dockerTarget == 'deploy'}}"
211212
with:
212213
context: .

0 commit comments

Comments
 (0)