Skip to content

Build dnsproxy

Build dnsproxy #15

Workflow file for this run

name: Build dnsproxy
on:
workflow_dispatch:
inputs:
dnsproxy-version:
description: 'dnsproxy version'
# required: false
default: 'vX.Y.Z-beta.U'
jobs:
build_linux:
name: Build linux
strategy:
matrix:
include:
- os: 'ubuntu-24.04'
runs-on: 'ubicloud'
build_type: Release
GOOS: linux
GOARCH: amd64
golang-image: '02ba164d64e0aee92ab808526e450dea546b5c59ee7d400d1c04c03c126cb59f'
target: x86_64-unknown-linux-musl
- os: 'ubuntu-24.04'
runs-on: 'ubicloud-standard-2-arm'
build_type: Release
GOOS: linux
GOARCH: arm64
golang-image: 'b2b1734fc70c4c5119b4e257fc558495bcd72e25b95c7ef2918eb705d9779211'
target: aarch64-unknown-linux-musl
runs-on: ${{ matrix.runs-on }}
outputs:
dnsproxy-checksum: ${{steps.dnsproxy.outputs.checksum}}
steps:
- name: echo
run: |
echo dnsproxy-version ${{github.event.inputs.dnsproxy-version}}
- name: clone
run: rm -rf dnsproxy && git clone https://github.com/AdguardTeam/dnsproxy
- name: checkout
run: cd dnsproxy && git checkout ${{github.event.inputs.dnsproxy-version}}
- name: download build script
run: cd dnsproxy && wget https://raw.githubusercontent.com/marlinprotocol/release-pipeline/master/dnsproxy-${{matrix.GOARCH}}.sh -O build-${{matrix.GOARCH}}.sh && chmod +x build-${{matrix.GOARCH}}.sh
- name: build
run: cd dnsproxy && sudo docker run --rm -v `pwd`:/code golang@sha256:${{matrix.golang-image}} /code/build-${{matrix.GOARCH}}.sh
- name: aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-southeast-1
- name: upx
run: |
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-${{matrix.GOARCH}}_linux.tar.xz -O upx.txz
mkdir -p upx && tar -xvf upx.txz --strip-components=1 -C upx
sudo mv upx/upx /usr/local/bin/
- name: upload dnsproxy
id: dnsproxy
# if: ${{github.event.inputs.dnsproxy-version != 'vX.Y.Z-beta.U'}}
run: |
# sudo upx dnsproxy/dnsproxy
echo "::set-output name=checksum::$(md5sum dnsproxy/dnsproxy | awk '{print $1;}')"
aws s3 cp dnsproxy/dnsproxy s3://public.artifacts.marlin.pro/projects/enclaves/dnsproxy_${{github.event.inputs.dnsproxy-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}