Skip to content

Commit

Permalink
build: all archs
Browse files Browse the repository at this point in the history
  • Loading branch information
2moe committed Mar 26, 2024
1 parent 3be339e commit 95849f5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
fail-fast: false
matrix:
arch:
# - x64
# - x64v2
# - x64v3
# - x64v4
# - rv64gc
# - arm64
# - armv7a
# - ppc64le
# - ppc
# - ppc64
# - loong64
# - i486
# - i686
# - x86
- x64
- x64v2
- x64v3
- x64v4
- rv64gc
- arm64
- armv7a
- ppc64le
- ppc
- ppc64
- loong64
- i486
- i686
- x86
runs-on: ubuntu-latest
defaults:
run:
Expand Down
9 changes: 6 additions & 3 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG TMM_ARCH_V0
FROM ghcr.io/2moe/zsh-static:${TMM_ARCH_V0} as zsh-tmm-arch
FROM ghcr.io/2cd/pacman-static:x64
FROM ghcr.io/2cd/pacman-static:x64 as pacman

RUN rm -rf /etc/pacman.d
COPY . /etc
Expand Down Expand Up @@ -281,10 +281,13 @@ set -fex
rm -rfv /root/* ||:
CLEAN

# ------------------------
# SHELL [ "/bin/bash", "-c" ]
# SHELL ["zsh", "--pipefail", "-fexc"]
ARG OPT=/opt/bin/
ENV LANG=C.UTF-8
COPY --from=zsh-tmm-arch ${OPT}busybox ${OPT}zsh ${OPT}
# ------------------------
FROM scratch
COPY --from=pacman / /
ENV LANG=C.UTF-8 \
PATH=/usr/local/sbin:/usr/local/bin:/usr/local/games:/bin:/usr/games:/opt/sbin:/opt/bin
CMD [ "bash" ]
8 changes: 4 additions & 4 deletions src/docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ local -A tmm_arch_map=(

arch_repo=ghcr.io/2cd/arch
# Only for x64: archive, testing
# x64v4, ppc*, loong64: "", slim
# other: "", base, base-devel, slim
# x64v4, ppc*, loong64, i486, i686: "", slim
# x64, x64v2, x64v3, rv64gc, arm64, armv7a, x86: "", base, base-devel, slim
#
# ARCHIVE=true
# BASE=true
Expand Down Expand Up @@ -100,8 +100,8 @@ for tmm_arch arch (${(kv)tmm_arch_map}) {
)
lower=dev ;|
(base*)
if [[ $tmm_arch == x64v4 ]] {
exit
case $tmm_arch {
(x64v4 | i[4-6]86 | ppc* | loong64) exit ;;
}
;;
}
Expand Down

0 comments on commit 95849f5

Please sign in to comment.