Skip to content

README: update index and improve compile section #21

README: update index and improve compile section

README: update index and improve compile section #21

Workflow file for this run

name: container build and push
on:
push:
branches: [ "*" ]
tags: [ '*.*.*' ]
pull_request:
branches: [ "*" ]
env:
REGISTRY: ghcr.io
EULIX_REGISTRY: hub.eulix.xyz
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: package-server
run: |-
sudo apt-get update && sudo apt-get install make git gn ninja-build python3 python3-pip libgtk-3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-x86-64-linux-gnu g++-x86-64-linux-gnu -y
GOARCH=amd64 make release_server && mv release/linux-amd64-server release/linux-x86_64-server
TARGET=aarch64-linux-gnu GOOS=linux GOARCH=arm64 make release_server && mv release/linux-arm64-server release/linux-aarch64-server
ls -al release
- name: package-client
run: |-
sudo apt-get update && sudo apt-get install make git gn ninja-build python3 python3-pip libgtk-3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-x86-64-linux-gnu g++-x86-64-linux-gnu -y
GOARCH=amd64 make release_client && mv release/linux-amd64-client release/linux-x86_64-client
TARGET=aarch64-linux-gnu GOOS=linux GOARCH=arm64 make release_client && mv release/linux-arm64-client release/linux-aarch64-client
ls -al release
- name: Archive Server artifacts
uses: actions/upload-artifact@v3
with:
name: gt-server
path: |
release/*-server
- name: Archive Client artifacts
uses: actions/upload-artifact@v3
with:
name: gt-client
path: |
release/*-client
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into registry ${{ env.EULIX_REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.EULIX_REGISTRY }}
username: ${{ secrets.EULIX_REGISTRY_USERNAME }}
password: ${{ secrets.EULIX_REGISTRY_PASSWORD }}
- name: Extract Docker metadata for Server
id: meta-server
uses: docker/metadata-action@v2
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.EULIX_REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
prefix=server-
- name: Build and push Docker image for Server
id: build-and-push-server
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-server.outputs.tags }}
labels: ${{ steps.meta-server.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile-server
- name: Extract Docker metadata for Client
id: meta-client
uses: docker/metadata-action@v2
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
${{ env.EULIX_REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
prefix=client-
- name: Build and push Docker image for Client
id: build-and-push-client
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-client.outputs.tags }}
labels: ${{ steps.meta-client.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile-client
- name: Extract Docker metadata for Server
id: meta-opensource-server
uses: docker/metadata-action@v2
with:
images: |
${{ env.EULIX_REGISTRY }}/cicada-private/aonetwork-server
flavor: |
prefix=opensource-server-
- name: Build and push Docker image for Server
id: build-and-push-opensource-server
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-opensource-server.outputs.tags }}
labels: ${{ steps.meta-opensource-server.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile-server
- name: Extract Docker metadata for Client
id: meta-opensource-client
uses: docker/metadata-action@v2
with:
images: |
${{ env.EULIX_REGISTRY }}/cicada-private/aonetwork-client
flavor: |
prefix=opensource-client-
- name: Build and push Docker image for Client
id: build-and-push-opensource-client
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-opensource-client.outputs.tags }}
labels: ${{ steps.meta-opensource-client.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile-client