230 lines
8.8 KiB
YAML
230 lines
8.8 KiB
YAML
# Mostly copied from i2p.i2p, by way of: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
|
|
# zlatinb did it originally, now I maintain it(idk)
|
|
|
|
name: Java CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: dependencies
|
|
run: sudo apt install gettext golang-go git ant
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
- name : Generate override.properties
|
|
run: |
|
|
rm -f override.properties
|
|
echo "build.built-by=GitHub Actions" >> override.properties
|
|
echo "noExe=true" >> override.properties
|
|
- name: install crx3
|
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
|
|
- name: install dzip
|
|
run: go install github.com/delicb/dzip@latest
|
|
- name: install amo-version
|
|
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
|
|
- name: install manifest-json-version
|
|
run: go install github.com/eyedeekay/manifest-json-version@latest
|
|
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
|
|
- run: cd ../i2p.i2p && ant pkg; true
|
|
- name: build with Ant
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
ant distclean all jpackage debian
|
|
- name: Upload Firefox Profile Strict
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2p.firefox.base.profile.zip
|
|
path: ./src/i2p.firefox.base.profile.zip
|
|
- name: Upload Firefox Profile Usability
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2p.firefox.usability.profile.zip
|
|
path: ./src/i2p.firefox.usability.profile.zip
|
|
- name: Upload i2pfirefox.jar
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pfirefox.jar
|
|
path: ./src/build/i2pfirefox.jar
|
|
- name: Upload i2pfirefox-plugin.jar
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pfirefox-plugin.jar
|
|
path: ./src/build/i2pfirefox-plugin.jar
|
|
- name: Upload i2pbrowser.tar.gz
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser.tar.gz
|
|
path: ./i2pbrowser.tar.gz
|
|
- name: Upload i2pbrowser.deb
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser_amd64.deb
|
|
path: ./i2pbrowser_*_amd64.deb
|
|
- name: build plugin with Ant
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
ant distclean pluginzip
|
|
- name: Upload i2pfirefox.zip (unsigned plugin)
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pfirefox.zip
|
|
path: ./plugin.zip
|
|
|
|
|
|
buildrpm:
|
|
runs-on: ubuntu-latest
|
|
container: fedora
|
|
|
|
steps:
|
|
- name: dependencies
|
|
run: sudo yum install -y gettext golang-go git ant jq wget curl gpg xz ca-certificates rpm-build
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
- run: echo [Adoptium] >> /etc/yum.repos.d/adoptium.repo
|
|
- run: echo name=Adoptium >> /etc/yum.repos.d/adoptium.repo
|
|
- run: . /etc/os-release; echo baseurl=https://packages.adoptium.net/artifactory/rpm/fedora/$VERSION_ID/x86_64/ >> /etc/yum.repos.d/adoptium.repo
|
|
- run: echo enabled=1 >> /etc/yum.repos.d/adoptium.repo
|
|
- run: echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo
|
|
- run: echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo
|
|
- run: dnf clean all && rm -rf /var/cache/dnf && dnf upgrade -y && dnf update -y
|
|
- run: dnf install -y temurin-21-jdk
|
|
- name: Generate override.properties
|
|
run: |
|
|
rm -f override.properties
|
|
echo "build.built-by=GitHub Actions" >> override.properties
|
|
echo "noExe=true" >> override.properties
|
|
- name: install crx3
|
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-linux; chmod +x $(go env GOPATH)/bin/crx3
|
|
- name: install dzip
|
|
run: go install github.com/delicb/dzip@latest
|
|
- name: install amo-version
|
|
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
|
|
- name: install manifest-json-version
|
|
run: go install github.com/eyedeekay/manifest-json-version@latest
|
|
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
|
|
- run: cd ../i2p.i2p && ant builddep
|
|
- name: build with Ant
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
ant distclean jpackage fedora
|
|
find . -name '*.rpm'
|
|
- name: Upload i2pbrowser.rpm
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser.x86_64.rpm
|
|
path: ./i2pbrowser-*-1.x86_64.rpm
|
|
|
|
|
|
buildwin:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
- name : Generate override.properties
|
|
run: |
|
|
bash -c 'rm -f override.properties'
|
|
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
|
|
bash -c 'echo "noExe=true" >> override.properties'
|
|
- name: install crx3
|
|
run: go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
|
- name: install dzip
|
|
run: go install github.com/delicb/dzip@latest
|
|
- name: install amo-version
|
|
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
|
|
- name: install manifest-json-version
|
|
run: go install github.com/eyedeekay/manifest-json-version@latest
|
|
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
|
|
- run: cd ../i2p.i2p && ant builddep
|
|
- name: build exe with Ant
|
|
run: |
|
|
ant windows
|
|
bash -c 'ls *.exe'
|
|
- name: Upload Firefox Profile EXE Installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser-${{ github.ref_name }}.exe
|
|
path: ./i2pbrowser-*.exe
|
|
- name: build msi with Ant
|
|
run: |
|
|
ant windows-msi
|
|
bash -c 'ls *.msi'
|
|
- name: Upload Firefox Profile MSI Installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser-${{ github.ref_name }}.msi
|
|
path: ./i2pbrowser-*.msi
|
|
- name: build portable zip with Ant
|
|
run: |
|
|
ant windows-portable
|
|
bash -c 'ls *.zip'
|
|
- name: Upload Firefox Profile Portable Zip
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser-portable.zip
|
|
path: ./i2pbrowser-portable.zip
|
|
|
|
buildmac:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
- name : Generate override.properties
|
|
run: |
|
|
bash -c 'rm -f override.properties'
|
|
bash -c 'echo "build.built-by=GitHub Actions" >> override.properties'
|
|
bash -c 'echo "noExe=true" >> override.properties'
|
|
- name: install crx3
|
|
run: mkdir -p $(go env GOPATH)/bin; wget -O $(go env GOPATH)/bin/crx3 https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/build-tools/crx3-osx; chmod +x $(go env GOPATH)/bin/crx3
|
|
- name: install dzip
|
|
run: go install github.com/delicb/dzip@latest
|
|
- name: install amo-version
|
|
run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c
|
|
- name: install manifest-json-version
|
|
run: go install github.com/eyedeekay/manifest-json-version@latest
|
|
- run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p
|
|
- run: cd ../i2p.i2p && ant builddep
|
|
- name: build dmg with Ant
|
|
run: |
|
|
ant macos
|
|
bash -c 'ls *.dmg'
|
|
- name: Upload Firefox Profile DMG Installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser-${{ github.ref_name }}.dmg
|
|
path: ./i2pbrowser-*.dmg
|
|
- name: build pkg with Ant
|
|
run: |
|
|
ant macos-pkg
|
|
bash -c 'ls *.pkg'
|
|
- name: Upload Firefox Profile PKG Installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: i2pbrowser-${{ github.ref_name }}.pkg
|
|
path: ./i2pbrowser-*.pkg |