Skip to content

feat: adding build-base on top of rchincha's arm additions #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,63 @@ jobs:
with:
path: stacker
key: ${{ matrix.build-id }}
build-arch:
runs-on: ubuntu-22.04
services:
registry:
image: registry:2
ports:
- 5000:5000
strategy:
matrix:
go-version: ${{fromJson(inputs.go-version)}}
privilege-level: ${{fromJson(inputs.privilege-level)}}
build-id: ${{fromJson(inputs.build-id)}}
arch: ["aarch64"]
name: "golang ${{ matrix.go-version }} privilege ${{ matrix.privilege-level }}"
steps:
- uses: actions/checkout@v3
- uses: benjlevesque/[email protected]
id: short-sha
- uses: uraimo/run-on-arch-action@v2
name: Build for ${{ matrix.arch }}
id: runcmd
with:
arch: ${{ matrix.arch }}
distro: ubuntu22.04

# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}

dockerRunArgs: -v $GITHUB_WORKSPACE:/src

# Set an output parameter `uname` for use in subsequent steps
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
# setup golang
apt-get update
apt-get install -yy wget curl tar software-properties-common git pkgconf build-essential
cd /tmp
wget -N https://go.dev/dl/go1.20.5.linux-arm64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.5.linux-arm64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# install dependencies
export GOPATH=/src
add-apt-repository -y ppa:project-machine/squashfuse
apt-get update
apt-get install -yy lxc-utils lxc-dev libacl1-dev jq libcap-dev libseccomp-dev libpam-dev bats parallel libzstd-dev
GO111MODULE=off go get github.com/opencontainers/umoci/cmd/umoci
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
apt-get install -yy autoconf automake make autogen autoconf libtool binutils git squashfs-tools libcryptsetup-dev libdevmapper-dev cryptsetup-bin squashfuse
cd /src
make go-download
make show-info
make stacker-dynamic VERSION_FULL=${{ matrix.build-id }}
make stacker VERSION_FULL=${{ matrix.build-id }} STACKER_BUILD_BASE_IMAGE=docker://arm64v8/alpine:edge
- name: Get the output
# Echo the `uname` output parameter from the `runcmd` step
run: |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}"

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_TAGS = exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containe

STACKER_OPTS=--oci-dir=$(BUILD_D)/oci --roots-dir=$(BUILD_D)/roots --stacker-dir=$(BUILD_D)/stacker --storage-type=overlay

build_stacker = go build -tags "$(BUILD_TAGS) $1" -ldflags "-X main.version=$(VERSION_FULL) -X main.lxc_version=$(LXC_VERSION) $2" -o $3 ./cmd/stacker
build_stacker = go build -buildvcs=false -tags "$(BUILD_TAGS) $1" -ldflags "-X main.version=$(VERSION_FULL) -X main.lxc_version=$(LXC_VERSION) $2" -o $3 ./cmd/stacker

STACKER_DOCKER_BASE?=docker://
STACKER_BUILD_BASE_IMAGE?=$(STACKER_DOCKER_BASE)alpine:edge
Expand Down
2 changes: 1 addition & 1 deletion build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build-env:
head -n1 /etc/apk/repositories | sed 's/main/testing/g' >> /etc/apk/repositories

apk add git findutils go automake autoconf make gcc libtool \
acl-dev acl-static \
acl-dev acl-static build-base \
libseccomp-dev libseccomp-static \
libcap-dev libcap-static \
libapparmor-dev \
Expand Down