Skip to content

Commit

Permalink
feat: Update go version
Browse files Browse the repository at this point in the history
Signed-off-by: Taras Drozdovskyi <[email protected]>
  • Loading branch information
tdrozdovsky committed Dec 21, 2024
1 parent 3d5449e commit 09feefa
Show file tree
Hide file tree
Showing 23 changed files with 145 additions and 139 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Example
**Test Configuration**:
* OS type & version: Ubuntu 20.04
* Hardware: x86-64 (e.g., x86, x86-64, arm, arm64)
* Toolchain: Docker v20.10 & Go v1.19
* Edge Orchestration Release: v1.1.x
* Toolchain: Docker v20.10 & Go v1.23
* Edge Orchestration Release: v1.2.x

# Checklist:

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x86c, x86_64c, armc, arm64c, x86_64n, x86_64a]
os: [ubuntu-20.04]
arch: [ x86_64c, armc, arm64c, x86_64n, x86_64a ]
os: [ ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Install Qemu
if: ${{ matrix.arch != 'x86_64c' && matrix.arch != 'x86_64a' && matrix.arch != 'x86_64n'}}
run: |
sudo apt-get update
sudo apt-get install -y qemu binfmt-support qemu-user-static
# - name: Install Qemu
# if: ${{ matrix.arch != 'x86_64c' && matrix.arch != 'x86_64a' && matrix.arch != 'x86_64n'}}
# run: |
# sudo apt-get update
# sudo apt-get install -y qemu binfmt-support qemu-user-static

- name: Install Android SDK & NDK
if: ${{ matrix.arch == 'x86_64a' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
name: Analyze
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
GOPATH: /home/runner/go

Expand All @@ -33,7 +33,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
4 changes: 2 additions & 2 deletions .github/workflows/go-fuzz-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
os: [ubuntu-20.04]
os: [ ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Fuzz test
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-vet-gofmt-staticcheck-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ permissions:

jobs:
lintvetanalysis:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set env vars (golint)
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ permissions:

jobs:
publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
permissions:
contents: write # for marvinpinto/action-automatic-releases to generate pre-release
name: Create Release
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest

steps:
- name: Harden Runner
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
os: [ubuntu-20.04]
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: '1.19'
go-version: '1.23'

- name: Set env vars (gocov)
run: |
Expand Down
5 changes: 0 additions & 5 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ config X86_64
---help---
"x86_64 architecture"

config X86
bool "x86"
---help---
"x86 architecture"

config ARM
bool "arm"
---help---
Expand Down
52 changes: 20 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ifeq ($(CONFIG_ARM),y)
INTERFACE_OUT_INC_DIR := $(INTERFACE_OUT_DIR)/inc/linux_arm
INTERFACE_OUT_BIN_DIR := $(INTERFACE_OUT_DIR)/bin/linux_arm
INTERFACE_OUT_LIB_DIR := $(INTERFACE_OUT_DIR)/lib/linux_arm
CONTAINER_ARCH="arm32v7"
CONTAINER_ARCH="arm/v7"
GOARCH=arm
CC="arm-linux-gnueabi-gcc"
GOARM=7
Expand All @@ -88,18 +88,10 @@ else ifeq ($(CONFIG_ARM64),y)
INTERFACE_OUT_INC_DIR := $(INTERFACE_OUT_DIR)/inc/linux_aarch64
INTERFACE_OUT_BIN_DIR := $(INTERFACE_OUT_DIR)/bin/linux_aarch64
INTERFACE_OUT_LIB_DIR := $(INTERFACE_OUT_DIR)/lib/linux_aarch64
CONTAINER_ARCH="arm64v8"
CONTAINER_ARCH="arm64"
GOARCH=arm64
CC="aarch64-linux-gnu-gcc"
ANDROID_TARGET="android/arm64"
else ifeq ($(CONFIG_X86),y)
INTERFACE_OUT_INC_DIR := $(INTERFACE_OUT_DIR)/inc/linux_x86
INTERFACE_OUT_BIN_DIR := $(INTERFACE_OUT_DIR)/bin/linux_x86
INTERFACE_OUT_LIB_DIR := $(INTERFACE_OUT_DIR)/lib/linux_x86
CONTAINER_ARCH="i386"
GOARCH=386
CC="gcc"
ANDROID_TARGET="android/386"
else ifeq ($(CONFIG_X86_64),y)
INTERFACE_OUT_INC_DIR := $(INTERFACE_OUT_DIR)/inc/linux_x86-64
INTERFACE_OUT_BIN_DIR := $(INTERFACE_OUT_DIR)/bin/linux_x86-64
Expand Down Expand Up @@ -155,12 +147,6 @@ define build-object-c
$(Q) ls -al $(INTERFACE_OUT_LIB_DIR)
endef

## edge-orchestration archive
define build-result
tree $(INTERFACE_OUT_DIR)
tree $(ANDROID_LIBRARY_OUT_DIR)
endef

## edge-orchestration android library build
build-object-java:
$(Q) mkdir -p $(ANDROID_LIBRARY_OUT_DIR)
Expand All @@ -181,18 +167,20 @@ build_docker_container:
$(call print_header, "Create Docker container $(CONTAINER_ARCH)")
-docker rm -f $(PKG_NAME)
-docker rmi -f $(DOCKER_IMAGE):$(CONTAINER_VERSION)
$(Q) mkdir -p $(BASE_DIR)/bin/qemu
ifeq ($(CONFIG_ARM),y)
ifneq ($(shell uname -m),armv7l)
$(Q) cp /usr/bin/qemu-arm-static $(BASE_DIR)/bin/qemu
endif
endif
ifeq ($(CONFIG_ARM64),y)
ifneq ($(shell uname -m),aarch64)
$(Q) cp /usr/bin/qemu-aarch64-static $(BASE_DIR)/bin/qemu
endif
endif
$(DOCKER) build --tag $(DOCKER_IMAGE):$(CONTAINER_VERSION) --file $(BASE_DIR)/Dockerfile --build-arg PLATFORM=$(CONTAINER_ARCH) .
-docker buildx create --use

# $(Q) mkdir -p $(BASE_DIR)/bin/qemu
#ifeq ($(CONFIG_ARM),y)
#ifneq ($(shell uname -m),armv7l)
# $(Q) cp /usr/bin/qemu-arm-static $(BASE_DIR)/bin/qemu
#endif
#endif
#ifeq ($(CONFIG_ARM64),y)
#ifneq ($(shell uname -m),aarch64)
# $(Q) cp /usr/bin/qemu-aarch64-static $(BASE_DIR)/bin/qemu
#endif
#endif
$(DOCKER) buildx build --platform linux/$(CONTAINER_ARCH) --tag $(DOCKER_IMAGE):$(CONTAINER_VERSION) --file $(BASE_DIR)/Dockerfile --load .
-docker save -o $(BASE_DIR)/bin/edge-orchestration.tar $(DOCKER_IMAGE)

## go test and coverage
Expand Down Expand Up @@ -290,12 +278,12 @@ ifeq ($(CONFIG_CONTAINER),y)
make build_docker_container
else ifeq ($(CONFIG_NATIVE),y)
$(call build-object-c)
$(call build-result)
tree $(INTERFACE_OUT_DIR)
else ifeq ($(CONFIG_ANDROID),y)
$(call print_header, "Target Binary is for Android")
$(call print_header, "Create Android archive from Java interface")
make build-object-java
$(call build-result)
tree $(ANDROID_LIBRARY_OUT_DIR)
endif

binary: check_context
Expand All @@ -305,12 +293,12 @@ ifeq ($(CONFIG_CONTAINER),y)
$(call build_binary)
else ifeq ($(CONFIG_NATIVE),y)
$(call build-object-c)
$(call build-result)
tree $(INTERFACE_OUT_DIR)
else ifeq ($(CONFIG_ANDROID),y)
$(call print_header, "Target Binary is for Android")
$(call print_header, "Create Android archive from Java interface")
make build-object-java
$(call build-result)
tree $(ANDROID_LIBRARY_OUT_DIR)
endif

.config:
Expand Down
32 changes: 0 additions & 32 deletions configs/defconfigs/x86c

This file was deleted.

7 changes: 3 additions & 4 deletions configs/defdockerfiles/alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Docker image for "edge-orchestration"
### alpine:3.12
ARG PLATFORM
FROM $PLATFORM/alpine:3.12
FROM alpine:3.12

# environment variables
ENV TARGET_DIR=/edge-orchestration
Expand All @@ -12,12 +11,12 @@ ENV MNEDC_BROADCAST_PORT=3333
ENV ZEROCONF_PORT=42425
ENV APP_BIN_DIR=bin
ENV APP_NAME=edge-orchestration
ENV APP_QEMU_DIR=$APP_BIN_DIR/qemu
# ENV APP_QEMU_DIR=$APP_BIN_DIR/qemu
ENV BUILD_DIR=build

# copy files
COPY $APP_BIN_DIR/$APP_NAME $BUILD_DIR/package/run.sh $TARGET_DIR/
COPY $APP_QEMU_DIR/ /usr/bin/
# COPY $APP_QEMU_DIR/ /usr/bin/
RUN mkdir -p $TARGET_DIR/res/

# install required tools
Expand Down
16 changes: 9 additions & 7 deletions configs/defdockerfiles/ubuntu
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Docker image for "edge-orchestration"
### ubuntu:20.04
ARG PLATFORM
FROM $PLATFORM/ubuntu:20.04
### ubuntu:24.04
FROM ubuntu:24.04

# environment variables
ENV TARGET_DIR=/edge-orchestration
Expand All @@ -13,19 +12,22 @@ ENV ZEROCONF_PORT=42425
ENV UI_PORT=49153
ENV APP_BIN_DIR=bin
ENV APP_NAME=edge-orchestration
ENV APP_QEMU_DIR=$APP_BIN_DIR/qemu
# ENV APP_QEMU_DIR=$APP_BIN_DIR/qemu
ENV BUILD_DIR=build
ENV WEB_DIR=web

# copy files
COPY $APP_BIN_DIR/$APP_NAME $BUILD_DIR/package/run.sh $TARGET_DIR/
COPY $APP_QEMU_DIR/ /usr/bin/
# COPY $APP_QEMU_DIR/ /usr/bin/
RUN mkdir -p $TARGET_DIR/res/
COPY $WEB_DIR/$BUILD_DIR/ $TARGET_DIR/$WEB_DIR/

# install required tools
RUN apt-get update
RUN apt-get install -y net-tools iproute2
# RUN apt-get update
# RUN apt-get install -y net-tools iproute2

RUN apt update
RUN apt install -y net-tools iproute2

# expose ports
EXPOSE $HTTP_PORT $MDNS_PORT $ZEROCONF_PORT $MNEDC_PORT $MNEDC_BROADCAST_PORT $UI_PORT
Expand Down
13 changes: 8 additions & 5 deletions configs/defdockerfiles/ubuntu_multistage
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Docker image for "edge-orchestration"
FROM --platform=$TARGETPLATFORM ubuntu:20.04 AS builder
FROM --platform=$TARGETPLATFORM ubuntu:24.04 AS builder

# environment variables
ARG TARGETPLATFORM
ENV GOVERSION=1.19.1
ENV GOVERSION=1.23.2
ENV GOPATH=/usr/local/go
ENV TARGET_DIR=/edge-orchestration

Expand All @@ -19,7 +19,7 @@ RUN script/install-golang.sh
ARG TARGETVERSION
RUN make buildx_binary VERSION=$TARGETVERSION

FROM ubuntu:20.04
FROM ubuntu:24.04

# environment variables
ENV TARGET_DIR=/edge-orchestration
Expand All @@ -44,8 +44,11 @@ COPY --from=builder $TARGET_DIR/$WEB_DIR/$BUILD_DIR $TARGET_DIR/$WEB_DIR/
RUN mkdir -p $TARGET_DIR/res/

# install required tools
RUN apt-get update
RUN apt-get install -y net-tools iproute2
# RUN apt-get update
# RUN apt-get install -y net-tools iproute2

RUN apt update
RUN apt install -y net-tools iproute2

# expose ports
EXPOSE $HTTP_PORT $MDNS_PORT $ZEROCONF_PORT $MNEDC_PORT $MNEDC_BROADCAST_PORT $UI_PORT
Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/x86_64_linux/x86_64_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please see the below [How to work](#how-to-work) to know how to run Edge Orchest
`$ sudo usermod -aG docker $USER`

- go compiler
- Version: 1.19 (or above)
- Version: 1.23 (or above)
- [How to install](https://golang.org/dl/)

> To build Edge Orchestrator from Go sources, you need to set GOPATH environment variable:
Expand Down
Loading

0 comments on commit 09feefa

Please sign in to comment.