Commit 3a7d097e authored by nimrod's avatar nimrod
Browse files

Cross build.

Build for different architectures.
parent 22c388da
Loading
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -2,8 +2,26 @@
build:
  image: buildpack-deps:bullseye
  before_script:
    - |
      case "$GOARCH" in
      386) DEBARCH="i386";;
      amd64) DEBARCH="amd64";;
      arm) DEBARCH="armhf";;
      arm64) DEBARCH="arm64";;
      esac
    - dpkg --add-architecture "$DEBARCH"
    - apt-get update
    - apt-get install -y meson golang systemd podman go-md2man bash-completion shellcheck cmake
    - >-
      apt-get install -y
      bash-completion
      "cmake:$DEBARCH"
      "crossbuild-essential-$DEBARCH"
      "golang:$DEBARCH"
      "go-md2man:$DEBARCH"
      "meson:$DEBARCH"
      "podman:$DEBARCH"
      "shellcheck:$DEBARCH"
      "systemd:$DEBARCH"
    - git clone https://github.com/containers/toolbox.git
    - cd toolbox
  script:
@@ -15,3 +33,7 @@ build:
      - toolbox/builddir/doc/
      - toolbox/builddir/meson-logs/
      - toolbox/builddir/.ninja_log
  parallel:
    matrix:
      - GOOS: ["linux"]
        GOARCH: ["386", "amd64", "arm", "arm64"]