mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-10-20 18:50:21 +01:00
commit
8784f7758e
2 changed files with 74 additions and 1 deletions
71
.github/workflows/build.yml
vendored
Normal file
71
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
name: Build and Cross-compile
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
compiler: [clang]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Ubuntu dependencies #
|
||||||
|
#######################
|
||||||
|
- name: Install dependencies (Ubuntu)
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install --no-install-recommends -y build-essential libboost-all-dev libssl-dev git
|
||||||
|
|
||||||
|
- name: Cache build artifacts (Ubuntu)
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
obj
|
||||||
|
libi2pd.a
|
||||||
|
key: ubuntu-build-${{ runner.os }}-${{ hashFiles('**/*.cpp', '**/*.h') }}
|
||||||
|
|
||||||
|
- name: Install MSYS2 (Windows)
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: |
|
||||||
|
Invoke-WebRequest -Uri "https://github.com/msys2/msys2-installer/releases/download/2025-08-30/msys2-x86_64-20250830.exe" -OutFile "msys2-installer.exe"
|
||||||
|
Start-Process -Wait -FilePath "msys2-installer.exe" -ArgumentList "/S"
|
||||||
|
C:\msys64\usr\bin\bash.exe -lc "pacman -Syu --noconfirm"
|
||||||
|
C:\msys64\usr\bin\bash.exe -lc "export ARCH=x86_64; export MINGW=mingw64; pacman -S --noconfirm mingw-w64-$ARCH-gcc mingw-w64-$ARCH-boost mingw-w64-$ARCH-openssl git make"
|
||||||
|
|
||||||
|
- name: Initialize Git Submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Build Project (Ubuntu)
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
make -j8
|
||||||
|
make stripall
|
||||||
|
make builddir
|
||||||
|
|
||||||
|
- name: Build Project (Windows)
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: |
|
||||||
|
C:\msys64\usr\bin\bash.exe -lc "cd /c/runner/work/i2pd-tools/i2pd-tools && make && make stripall && make builddir"
|
||||||
|
|
||||||
|
- name: Upload binaries
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: my-binaries-${{ matrix.os }}
|
||||||
|
path: build/*
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -107,7 +107,9 @@ clean-obj:
|
||||||
rm -f $(wildcard *.o)
|
rm -f $(wildcard *.o)
|
||||||
stripall:
|
stripall:
|
||||||
strip b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo x25519 verifyhost vain autoconf
|
strip b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo x25519 verifyhost vain autoconf
|
||||||
|
builddir:
|
||||||
|
mkdir -p build
|
||||||
|
mv b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo x25519 verifyhost vain autoconf build/ || true
|
||||||
clean-bin:
|
clean-bin:
|
||||||
rm -f b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo x25519 verifyhost vain autoconf
|
rm -f b33address famtool i2pbase64 keygen keyinfo offlinekeys regaddr regaddr_3ld regaddralias routerinfo x25519 verifyhost vain autoconf
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue