Skip to content

Commit

Permalink
add more linux distributions to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-chung committed Nov 4, 2023
1 parent a1a8463 commit 888fb42
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,77 @@ jobs:
with:
files: "./HelloHTTP-${{ github.ref_name }}-macos-${{ runner.arch }}.dmg"
draft: true
build-other-linux-x64:
name: Build on ${{ matrix.distro_name }} x64
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- distro_name: debian
image: debian:bullseye
container: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: ./gradlew createDistributable packageDistributionForCurrentOS
- run: pushd ./build/compose/binaries/main/app && ls -al && tar -cvzf "app.tar.gz" "Hello HTTP" && mv "app.tar.gz" "../../../../../HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ runner.arch }}.tar.gz" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ runner.arch }}.tar.gz"
draft: true
build-other-linux-other-archs:
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- arch: armv7
distro: bullseye
distro_name: debian
- arch: armv7
distro: fedora_latest
distro_name: fedora
- arch: aarch64
distro: bullseye
distro_name: debian
- arch: aarch64
distro: ubuntu20.04
distro_name: ubuntu
- arch: aarch64
distro: fedora_latest
distro_name: fedora
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# setup: |
# mkdir -p "${PWD}/artifacts"
# dockerRunArgs: |
# --volume "${PWD}/artifacts:/artifacts"
env: |
artifact_name: HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ matrix.arch }}.tar.gz
install: |
mkdir -p /wd
cd /wd
case "${{ matrix.distro }}" in
ubuntu*|bullseye)
apt-get update -q
apt-get install -q -y git binutils openjdk-17-jdk
;;
fedora*)
dnf -y update
dnf -y install which git java-17-openjdk-devel
;;
esac
run: |
./gradlew createDistributable packageDistributionForCurrentOS
pushd ./build/compose/binaries/main/app && ls -al && tar -cvzf "app.tar.gz" "Hello HTTP" && mv "app.tar.gz" "../../../../../${artifact_name}" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-${{ matrix.distro }}-${{ matrix.arch }}.zip"
draft: true

0 comments on commit 888fb42

Please sign in to comment.