-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into last-release
- Loading branch information
Showing
13 changed files
with
123 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -43,32 +43,33 @@ 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 }} | ||
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' | ||
|
||
- 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) | ||
|
@@ -79,23 +80,23 @@ 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@v4 | ||
id: cache-restore | ||
if: "${{ github.event.inputs.dockerTarget != 'base' }}" | ||
with: | ||
path: "/home/runner/.local/bin" | ||
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@v4 | ||
id: cache | ||
if: "${{ github.event.inputs.dockerTarget == 'base' }}" | ||
with: | ||
path: "/home/runner/.local/bin" | ||
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} | ||
|
||
- name: Install wabt, binaryen | ||
uses: kingdonb/[email protected].5 | ||
uses: kingdonb/[email protected].6 | ||
if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}" | ||
with: | ||
version: ${{ env.WABT_VERSION }} | ||
|
@@ -121,8 +122,31 @@ 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-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@v4 | ||
uses: docker/build-push-action@v5 | ||
if: "${{ github.event.inputs.dockerTarget != 'base'}}" | ||
with: | ||
context: . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 }} | ||
|
@@ -37,8 +37,21 @@ 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 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1.4' | ||
bundler-cache: true | ||
|
@@ -55,26 +68,14 @@ 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 | ||
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: | | ||
mkdir -p "${HOME}/.local/bin" | ||
echo "${HOME}/.local/bin" >> $GITHUB_PATH | ||
- name: Install wabt, binaryen | ||
uses: kingdonb/[email protected].5 | ||
uses: kingdonb/[email protected].6 | ||
with: | ||
version: ${{ env.WABT_VERSION }} | ||
version2: ${{ env.BINARYEN_VERSION }} | ||
|
@@ -91,8 +92,37 @@ 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-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@v4 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -85,23 +86,23 @@ 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@v4 | ||
id: cache-restore | ||
if: "${{ github.event.inputs.dockerTarget != 'base' }}" | ||
with: | ||
path: "/home/runner/.local/bin" | ||
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@v4 | ||
id: cache | ||
if: "${{ github.event.inputs.dockerTarget == 'base' }}" | ||
with: | ||
path: "/home/runner/.local/bin" | ||
key: ${{ runner.os }}-wabt_${{ env.WABT_VERSION }}-binaryen_${{ env.BINARYEN_VERSION }} | ||
|
||
- name: Install wabt, binaryen | ||
uses: kingdonb/[email protected].5 | ||
uses: kingdonb/[email protected].6 | ||
if: "${{ github.event.inputs.dockerTarget == 'base' && steps.cache.outputs.cache-hit != 'true' }}" | ||
with: | ||
version: ${{ env.WABT_VERSION }} | ||
|
@@ -140,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: . | ||
|
@@ -155,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: . | ||
|
@@ -172,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: . | ||
|
@@ -189,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: . | ||
|
@@ -206,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: . | ||
|
Oops, something went wrong.