Skip to content

Commit

Permalink
WIP: ci: recent podman, buildah in toolchain build
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Apr 10, 2024
1 parent b5d7549 commit 11d137e
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .github/install-latest-buildah.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev li
git clone https://github.com/containers/buildah
cd buildah
make runc all SECURITYTAGS="apparmor seccomp"
sudo make install install.runc
buildah --help
which buildah
#sudo make install install.runc
#buildah --help
#which buildah
83 changes: 58 additions & 25 deletions .github/workflows/toolchains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ jobs:
with:
go-version: '>=1.20.0'

- name: Install latest buildah
run: |
./.github/install-latest-buildah.sh
#- name: Install latest buildah
#run: |
#buildah --version
#./.github/install-latest-buildah.sh
#buildah --version

#- name: Install latest podman, buildah
#run: |
#podman --version
#buildah --version
#eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
#brew install podman
#podman --version
#buildah --version

- name: Pull latest Docker images
run: |
Expand All @@ -36,17 +47,30 @@ jobs:

- name: Build itk-wasm-base
run: |
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | docker load ; fi
./src/docker/itk-wasm-base/build.sh
mkdir -p ./docker-cache
docker export itkwasm/emscripten-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-emscripten-base.tar.xz
- name: Build itk-wasm-base
run: |
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | docker load ; fi
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | podman load ; fi
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | podman load ; fi
podman --version
buildah --version
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
podman --version
buildah --version
#./src/docker/itk-wasm-base/build.sh
./src/docker/itk-wasm-base/build.sh --with-wasi
mkdir -p ./docker-cache
docker export itkwasm/wasi-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-wasi-base.tar.xz
podman export itkwasm/emscripten-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-emscripten-base.tar.xz
podman export itkwasm/wasi-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-wasi-base.tar.xz
#- name: Build itk-wasm-base
#run: |
#if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | docker load ; fi
#podman --version
#buildah --version
#eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
#./src/docker/itk-wasm-base/build.sh --with-wasi
#podman --version
#buildah --version
#mkdir -p ./docker-cache
#docker export itkwasm/wasi-base:latest | xz -e9 -T0 > ./docker-cache/itk-wasm-wasi-base.tar.xz

- name: Cache docker results
uses: actions/upload-artifact@v4
Expand All @@ -61,18 +85,23 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main

- uses: actions/setup-go@v5
with:
go-version: '>=1.20.0'
#- uses: actions/setup-go@v5
#with:
#go-version: '>=1.20.0'

- name: Install latest buildah
run: |
./.github/install-latest-buildah.sh
#- name: Install latest buildah
#run: |
#./.github/install-latest-buildah.sh

#- name: Install latest podman, buildah
#run: |
#eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
#brew install podman

- name: Pull latest Docker images
run: |
Expand All @@ -87,10 +116,14 @@ jobs:
- name: Build itk-wasm
run: |
sudo mkdir -p /var/lib/docker/tmp
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | docker import - itkwasm/emscripten:latest ; fi
./src/docker/itk-wasm/build.sh
- name: Build itk-wasi
run: |
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | docker import - itkwasm/wasi:latest ; fi
#eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
if [[ -e ./docker-cache/itk-wasm-emscripten-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-emscripten-base.tar.xz | podman import - itkwasm/emscripten:latest ; fi
if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | podman import - itkwasm/wasi:latest ; fi
#./src/docker/itk-wasm/build.sh
./src/docker/itk-wasm/build.sh --with-wasi
#- name: Build itk-wasi
#run: |
#if [[ -e ./docker-cache/itk-wasm-wasi-base.tar.xz ]]; then xz -d -k < ./docker-cache/itk-wasm-wasi-base.tar.xz | podman import - itkwasm/wasi:latest ; fi
##eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
#./src/docker/itk-wasm/build.sh --with-wasi

0 comments on commit 11d137e

Please sign in to comment.