Skip to content

Two-way mode, static bindings #37

Two-way mode, static bindings

Two-way mode, static bindings #37

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
IMAGE_NAME: wg-obfuscator
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/386,linux/ppc64le,linux/s390x
jobs:
build-docker:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6, linux/386, linux/ppc64le, linux/s390x]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Prepare filename and tag
id: prep
run: |
SAFE_PLATFORM="${{ matrix.platform }}"
SAFE_PLATFORM=$(echo "$SAFE_PLATFORM" | sed 's|linux/||;s|/|-|g')
echo "safe_platform=$SAFE_PLATFORM" >> $GITHUB_OUTPUT
- name: Build per-arch image and export as tar
uses: docker/build-push-action@v5
with:
push: false
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_NAME }}-${{ steps.prep.outputs.safe_platform }}
platforms: ${{ matrix.platform }}
outputs: type=docker,dest=${{ env.IMAGE_NAME }}-docker-${{ steps.prep.outputs.safe_platform }}.tar
context: .
- name: Upload image tar
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-docker-${{ steps.prep.outputs.safe_platform }}.tar
path: ${{ env.IMAGE_NAME }}-docker-${{ steps.prep.outputs.safe_platform }}.tar
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: make clean all x64
run: make clean all
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wg-obfuscator-linux-x64.zip
path: .
- name: apt update
run: sudo apt-get update
- name: Get ARM toolchain
run: sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
- name: make clean all arm
run: make clean all CC=arm-linux-gnueabihf-gcc
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wg-obfuscator-linux-arm.zip
path: .
- name: make clean all arm64
run: make clean all CC=aarch64-linux-gnu-gcc
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-linux-arm64.zip
path: .
build-macos:
runs-on: macos-latest
steps:
- name: Install argp
run: brew install argp-standalone
- name: Checkout
uses: actions/checkout@v4
- name: make clean all
run: make clean all
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-macos.zip
path: .
build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
gcc
git
libargp-devel
- name: Checkout
uses: actions/checkout@v4
- name: make clean all
run: make clean all
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-windows.zip
path: .