Skip to content

Commit

Permalink
CI: Add build checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed May 12, 2024
1 parent ba7e622 commit 4f6f718
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 30 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: "Build"

on:
push:
pull_request:

jobs:
linux:
name: Linux
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- name: arm64
tool: aarch64-unknown-linux-musl
- name: arm32
tool: arm-unknown-linux-musleabi
- name: arm32hf
tool: arm-unknown-linux-musleabihf
- name: loong64
tool: loongarch64-unknown-linux-musl
- name: mips64el
tool: mips64el-unknown-linux-musl
- name: mips64
tool: mips64-unknown-linux-musl
- name: mips32el
tool: mipsel-unknown-linux-musl
- name: mips32
tool: mips-unknown-linux-musl
- name: riscv32
tool: riscv32-unknown-linux-musl
- name: riscv64
tool: riscv64-unknown-linux-musl
- name: x86_32
tool: x86_64-multilib-linux-musl
env:
CFLAGS: "-m32"
- name: x86_64
tool: x86_64-multilib-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build ${{ matrix.name }}
run: |
sudo mkdir -p /opt/x-tools
wget https://github.com/musl-cross/musl-cross/releases/download/20240317/${{ matrix.tool }}.tgz
sudo tar xf ${{ matrix.tool }}.tgz -C /opt/x-tools
make CROSS_PREFIX=/opt/x-tools/${{ matrix.tool }}/bin/${{ matrix.tool }}- CFLAGS=${{ matrix.env.CFLAGS }} ENABLE_STATIC=1 -j`nproc`
macos:
name: macOS
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build
run: |
make
llvm:
name: LLVM
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Prepare
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
sudo apt install -y clang
- name: Build
run: |
make CC=clang ENABLE_STATIC=1 -j`nproc`
30 changes: 0 additions & 30 deletions .github/workflows/llvm.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# HevSocks5Server

[![status](https://github.com/heiher/hev-socks5-server/actions/workflows/build.yaml/badge.svg?branch=master&event=push)](https://github.com/heiher/hev-socks5-server)

HevSocks5Server is a simple, lightweight socks5 server for Unix.

## Features
Expand Down

0 comments on commit 4f6f718

Please sign in to comment.