-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-1.2-beta3' into dev
- Loading branch information
Showing
36 changed files
with
1,169 additions
and
841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,22 +18,71 @@ jobs: | |
sudo apt upgrade -y | ||
- name: Install toolchain | ||
run: | | ||
sudo apt install -y gcc gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu | ||
sudo mv /etc/apt/sources.list /etc/apt/sources.list.d/main-amd64.list | ||
sudo apt install -y gcc gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-powerpc64le-linux-gnu gcc-riscv64-linux-gnu gcc-s390x-linux-gnu | ||
sudo mv /etc/apt/sources.list /etc/apt/sources.list.d/main.list | ||
sudo touch /etc/apt/sources.list | ||
sudo sed -i '/^$/d;/^#/d;s/deb/deb [arch=amd64]/g' /etc/apt/sources.list.d/main-amd64.list | ||
sudo cp /etc/apt/sources.list.d/main-amd64.list /etc/apt/sources.list.d/main-arm.list | ||
sudo sed -i 's/arch=amd64/arch=armhf,arm64/g;s/archive/ports/g;s/security\./security.ports./g;s/\/ubuntu/\/ubuntu-ports/g' /etc/apt/sources.list.d/main-arm.list | ||
sudo dpkg --add-architecture armhf | ||
sudo sed -i '/^$/d;/^#/d;s/deb/deb [arch=amd64]/g' /etc/apt/sources.list.d/main.list | ||
sudo cp /etc/apt/sources.list.d/main.list /etc/apt/sources.list.d/port.list | ||
sudo sed -i 's/arch=amd64/arch=arm64,armhf,ppc64el,riscv64,s390x/g;s/archive/ports/g;s/security\./security.ports./g;s/\/ubuntu/\/ubuntu-ports/g' /etc/apt/sources.list.d/port.list | ||
sudo dpkg --add-architecture arm64 | ||
sudo dpkg --add-architecture armhf | ||
sudo dpkg --add-architecture ppc64el | ||
sudo dpkg --add-architecture riscv64 | ||
sudo dpkg --add-architecture s390x | ||
sudo apt update | ||
sudo apt install -y libcjson-dev:amd64 libcjson-dev:armhf libcjson-dev:arm64 | ||
- name: Build artifacts | ||
sudo apt install -y libcjson-dev:amd64 libcjson-dev:arm64 libcjson-dev:armhf libcjson-dev:ppc64el libcjson-dev:riscv64 libcjson-dev:s390x | ||
- name: Build amd64 | ||
run: | | ||
mkdir build-amd64 | ||
cd build-amd64 | ||
cmake -DCMAKE_C_COMPILER=`which gcc` -DEXEC_SUFFIX="-amd64" .. | ||
make | ||
cd .. | ||
- name: Build arm64 | ||
run: | | ||
mkdir build-arm64 | ||
cd build-arm64 | ||
cmake -DCMAKE_C_COMPILER=`which aarch64-linux-gnu-gcc` -DEXEC_SUFFIX="-arm64" .. | ||
make | ||
cd .. | ||
- name: Build armhf | ||
run: | | ||
mkdir build-armhf | ||
cd build-armhf | ||
cmake -DCMAKE_C_COMPILER=`which arm-linux-gnueabihf-gcc` -DEXEC_SUFFIX="-armhf" .. | ||
make | ||
cd .. | ||
- name: Build ppc64el | ||
run: | | ||
mkdir build-ppc64el | ||
cd build-ppc64el | ||
cmake -DCMAKE_C_COMPILER=`which powerpc64le-linux-gnu-gcc` -DEXEC_SUFFIX="-ppc64el" .. | ||
make | ||
cd .. | ||
- name: Build riscv64 | ||
run: | | ||
mkdir build-riscv64 | ||
cd build-riscv64 | ||
cmake -DCMAKE_C_COMPILER=`which riscv64-linux-gnu-gcc` -DEXEC_SUFFIX="-riscv64" .. | ||
make | ||
cd .. | ||
- name: Build s390x | ||
run: | | ||
mkdir build-s390x | ||
cd build-s390x | ||
cmake -DCMAKE_C_COMPILER=`which s390x-linux-gnu-gcc` -DEXEC_SUFFIX="-s390x" .. | ||
make | ||
cd .. | ||
- name: Post build | ||
run: | | ||
mkdir build | ||
gcc -o build/mcrelay-amd64 mcrelay.c -lresolv -lcjson | ||
arm-linux-gnueabihf-gcc -o build/mcrelay-armhf mcrelay.c -lresolv -lcjson | ||
aarch64-linux-gnu-gcc -o build/mcrelay-arm64 mcrelay.c -lresolv -lcjson | ||
cd build | ||
cp ../build-amd64/mcrelay-amd64 . | ||
cp ../build-arm64/mcrelay-arm64 . | ||
cp ../build-armhf/mcrelay-armhf . | ||
cp ../build-ppc64el/mcrelay-ppc64el . | ||
cp ../build-riscv64/mcrelay-riscv64 . | ||
cp ../build-s390x/mcrelay-s390x . | ||
- name: Upload artifacts | ||
uses: AButler/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
build-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
project(mcrelay${EXEC_SUFFIX} | ||
VERSION 1.2 | ||
LANGUAGES C) | ||
add_executable(mcrelay${EXEC_SUFFIX} src/basic.c src/config.c src/log.c src/main.c src/misc.c src/network.c src/protocols/common.c src/protocols/handshake.c src/protocols/handshake_legacy.c src/protocols/proxy.c) | ||
target_link_libraries(mcrelay${EXEC_SUFFIX} -lresolv -lcjson) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.