Skip to content

Commit 6652f0e

Browse files
authored
Merge pull request #24 from sarus-suite/opensuse156-support
Opensuse156 support
2 parents e429292 + 10cc11a commit 6652f0e

File tree

4 files changed

+137
-2
lines changed

4 files changed

+137
-2
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM opensuse/leap:15.6
2+
3+
RUN zypper --non-interactive refresh && \
4+
zypper --non-interactive update -y && \
5+
zypper --non-interactive install -y \
6+
wget \
7+
tar \
8+
gzip \
9+
git \
10+
fuse3 \
11+
btrfsprogs \
12+
squashfs \
13+
squashfuse \
14+
fuse-overlayfs \
15+
squashfs \
16+
inotify-tools \
17+
rsync \
18+
device-mapper-devel \
19+
patterns-devel-base-devel_basis \
20+
libbtrfs-devel && \
21+
zypper clean --all
22+
23+
# Go toolchain
24+
ARG GO_VERSION=1.24.0
25+
RUN set -eux; \
26+
UNAME_M="$(uname -m)"; \
27+
case "${UNAME_M}" in \
28+
x86_64) GOARCH=amd64;; \
29+
aarch64) GOARCH=arm64;; \
30+
*) echo "unsupported arch: ${UNAME_M}"; exit 1;; \
31+
esac; \
32+
wget "https://go.dev/dl/go${GO_VERSION}.linux-${GOARCH}.tar.gz"; \
33+
rm -rf /usr/local/go; \
34+
tar -C /usr/local -xzf "go${GO_VERSION}.linux-${GOARCH}.tar.gz"; \
35+
rm "go${GO_VERSION}.linux-${GOARCH}.tar.gz"
36+
37+
ENV PATH=$PATH:/usr/local/go/bin
38+
39+
CMD ["bash"]

.github/workflows/ci-container.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

49-
- name: Build & push multi-arch image
49+
- name: Build & push multi-arch opensuse-15.5 image
5050
run: |
5151
docker buildx build \
5252
--builder "$BUILDER_INSTANCE" \
@@ -55,3 +55,13 @@ jobs:
5555
--tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ci-runner:latest \
5656
--push \
5757
.
58+
59+
- name: Build & push multi-arch opensuse-15.6 image
60+
run: |
61+
docker buildx build \
62+
--builder "$BUILDER_INSTANCE" \
63+
--platform linux/amd64,linux/arm64 \
64+
--file .github/containers/Containerfile-opensuse156.ci \
65+
--tag ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/ci-runner-opensuse156:latest \
66+
--push \
67+
.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Release opensuse 15.6 amd64 and arm64
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
actions: write
11+
attestations: write
12+
packages: read
13+
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
include:
20+
- arch: amd64
21+
runner: ubuntu-latest
22+
container_opts: "--platform linux/amd64"
23+
- arch: arm64
24+
runner: ubuntu-24.04-arm
25+
container_opts: "--platform linux/arm64"
26+
runs-on: ${{ matrix.runner }}
27+
container:
28+
image: ghcr.io/sarus-suite/parallax/ci-runner-opensuse156:latest
29+
options: ${{ matrix.container_opts }}
30+
credentials:
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
GITHUB_REPOSITORY: ${{ github.repository }}
36+
GITHUB_REF: ${{ github.ref }}
37+
GITHUB_EVENT_PATH: ${{ github.event_path }}
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
43+
- name: Dump GO env
44+
run: |
45+
echo "--- all GO* vars ---"
46+
env | grep '^GO' || true
47+
echo "--- go env ---"
48+
go env
49+
50+
- name: Install go deps
51+
run: go get .
52+
53+
- name: Build Linux binary ${{ matrix.arch }}
54+
env:
55+
CGO_ENABLED: "1"
56+
CC: gcc
57+
GOARCH: ${{ matrix.arch }}
58+
GOOS: linux
59+
GOFLAGS: "-buildvcs=false"
60+
GO_LDFLAGS: "-linkmode external"
61+
CGO_LDFLAGS: "-g -O2"
62+
run: |
63+
mkdir -p dist
64+
go build -v -x \
65+
-ldflags "-X 'github.com/sarus-suite/parallax/version.Version=${{ github.ref_name }}'" \
66+
-o dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} \
67+
.
68+
69+
- name: Inspect binary
70+
run: |
71+
stat dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }}
72+
readelf -l dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} | grep interpreter || true
73+
ldd dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }} || echo "static :/"
74+
75+
- name: Create or Update GitHub Release and Upload Asset
76+
uses: ncipollo/release-action@v1
77+
with:
78+
token: ${{ secrets.GITHUB_TOKEN }}
79+
tag: ${{ github.ref_name }}
80+
name: Release ${{ github.ref_name }}
81+
artifacts: dist/parallax-${{ github.ref_name }}-opensuse-15.6-${{ matrix.arch }}
82+
allowUpdates: true
83+
replacesArtifacts: false
84+
draft: false
85+
prerelease: false
86+

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release opensuse amd64 and arm64
1+
name: Release opensuse 15.5 amd64 and arm64
22

33
on:
44
push:

0 commit comments

Comments
 (0)