Skip to content

Commit

Permalink
far2l 2.5.0 with extract script (#48)
Browse files Browse the repository at this point in the history
add `gnu` version with plugins
  • Loading branch information
hemnstill authored Mar 4, 2023
1 parent 0f7a2d3 commit 87760da
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 75 deletions.
72 changes: 27 additions & 45 deletions .github/workflows/far2l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,63 @@ jobs:
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

far2l-alpine-musl:
alpine-musl:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
with:
workflow: ${{ github.workflow }}

far2l-ubuntu-glibc:
ubuntu-glibc:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}
version: 18.04

far2l-alpine-musl-test:
needs: far2l-alpine-musl
ubuntu-glibc-p:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
uses: ./.github/workflows/build-ubuntu.yml
with:
artifact: build-musl
test-run: |
ldd ./${{ github.workflow }}
./${{ github.workflow }} --help | head -n2
workflow: ${{ github.workflow }}
version: 18.04
toolset: glibc-p

far2l-alpine-glibc-test:
needs: far2l-ubuntu-glibc
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/test-alpine.yml
test-ubuntu:
needs: ubuntu-glibc
uses: ./.github/workflows/test-ubuntu.yml
with:
workflow: ${{ github.workflow }}
artifact: build-glibc
test-run: |
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk
apk add --no-cache glibc-2.34-r0.apk
ldd ./${{ github.workflow }} || true
./${{ github.workflow }} --help | head -n2

far2l-ubuntu-musl-test:
needs: far2l-alpine-musl
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
test-ubuntu-p:
needs: ubuntu-glibc-p
uses: ./.github/workflows/test-ubuntu.yml
with:
artifact: build-musl
test-run: |
apt update
apt -y install musl
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
ldd ./${{ github.workflow }}
./${{ github.workflow }} --help | head -n2
workflow: ${{ github.workflow }}
artifact: build-glibc-p

far2l-ubuntu-glibc-test:
needs: far2l-ubuntu-glibc
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/test-ubuntu.yml
test-alpine:
needs: alpine-musl
uses: ./.github/workflows/test-alpine.yml
with:
artifact: build-glibc
test-run: |
ldd ./${{ github.workflow }}
./${{ github.workflow }} --help | head -n2
workflow: ${{ github.workflow }}
artifact: build-musl

far2l-release:
needs: [far2l-alpine-musl-test,
far2l-alpine-glibc-test,
far2l-ubuntu-musl-test,
far2l-ubuntu-glibc-test]
needs: [test-alpine,
test-ubuntu,
test-ubuntu-p]
uses: ./.github/workflows/release.yml
with:
workflow: ${{ github.workflow }}
tool_version: '2.4.0-beta-694878351f'
tool_version: '2.5.0'
prepare_body: |
bsdtar -Oxf ./build-musl/build-musl.tar.gz build-musl.md >> body.md
bsdtar -Oxf ./build-glibc/build-glibc.tar.gz build-glibc.md >> body.md
artifacts: ./build-musl/build-musl.tar.gz,./build-glibc/build-glibc.tar.gz
bsdtar -Oxf ./build-glibc-p/build-glibc-p.tar.gz build-glibc-p.md >> body.md
artifacts: ./build-musl/build-musl.tar.gz,./build-glibc/build-glibc.tar.gz,./build-glibc-p/build-glibc-p.tar.gz
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/bsdtar-3.6.2/total?label=⭳%20bsdtar-3.6.2)](https://github.com/hemnstill/StandaloneTools/releases/tag/bsdtar-3.6.2) | [![GitHub Repo stars](https://img.shields.io/github/stars/libarchive/libarchive?style=social&label=libarchive)](https://github.com/libarchive/libarchive) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/libarchive/libarchive)](https://github.com/libarchive/libarchive/releases/latest) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pcre2grep-10.40/total?label=⭳%20pcre2grep-10.40)](https://github.com/hemnstill/StandaloneTools/releases/tag/pcre2grep-10.40) | [![GitHub Repo stars](https://img.shields.io/github/stars/PCRE2Project/pcre2?style=social&label=PCRE2)](https://github.com/PCRE2Project/pcre2) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/PCRE2Project/pcre2)](https://github.com/PCRE2Project/pcre2/releases/latest) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/openssl-3.0.1/total?label=⭳%20openssl-3.0.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/openssl-3.0.1) <br/>[![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/openssl-1_1_1m/total?label=⭳%20openssl-1_1_1m)](https://github.com/hemnstill/StandaloneTools/releases/tag/openssl-1_1_1m) | [![GitHub Repo stars](https://img.shields.io/github/stars/openssl/openssl?style=social&label=OpenSSL)](https://github.com/openssl/openssl) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/openssl/openssl)](https://www.openssl.org/news/changelog.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/far2l-2.4.0-beta/total?label=⭳%20far2l-2.4.0-beta)](https://github.com/hemnstill/StandaloneTools/releases/tag/far2l-2.4.0-beta) | [![GitHub Repo stars](https://img.shields.io/github/stars/elfmz/far2l?style=social&label=far2l)](https://github.com/elfmz/far2l) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/elfmz/far2l)](https://github.com/elfmz/far2l/releases/latest) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/far2l-2.5.0/total?label=⭳%20far2l-2.5.0)](https://github.com/hemnstill/StandaloneTools/releases/tag/far2l-2.5.0) | [![GitHub Repo stars](https://img.shields.io/github/stars/elfmz/far2l?style=social&label=far2l)](https://github.com/elfmz/far2l) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/elfmz/far2l)](https://github.com/elfmz/far2l/releases/latest) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pg_dump-15.1/total?label=⭳%20pg_dump-15.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/pg_dump-15.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/postgres/postgres?style=social&label=postgres)](https://github.com/postgres/postgres) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/postgres/postgres)](https://www.postgresql.org/docs/current/index.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/busybox-1.35.0-FRP-4784/total?label=⭳%20busybox-1.35.0-FRP-4784)](https://github.com/hemnstill/StandaloneTools/releases/tag/busybox-1.35.0-FRP-4784) | [![GitHub Repo stars](https://img.shields.io/github/stars/rmyorston/busybox-w32?style=social&label=busybox-w32)](https://github.com/rmyorston/busybox-w32) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/rmyorston/busybox-w32)](https://frippery.org/busybox/release-notes/current.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/python-3.11.1/total?label=⭳%20python-3.11.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/python-3.11.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/indygreg/python-build-standalone?style=social&label=python-build-standalone)](https://github.com/indygreg/python-build-standalone) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/indygreg/python-build-standalone)](https://python-build-standalone.readthedocs.io/en/latest/) <br> [![GitHub Repo stars](https://img.shields.io/github/stars/python/cpython?style=social&label=python)](https://github.com/python/cpython) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/cpython)](https://docs.python.org/3/) |
Expand Down
103 changes: 103 additions & 0 deletions far2l/build_glibc-p.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
set -e
export DEBIAN_FRONTEND=noninteractive

echo "::group::install deps"

apt update
apt install -y \
build-essential \
libspdlog-dev \
patchelf \
wget \
gawk \
m4 \
libx11-dev \
libxi-dev \
libxerces-c-dev \
libuchardet-dev \
libssl-dev \
libnfs-dev \
libneon27-dev \
libarchive-dev \
libpcre3-dev \
libsmbclient-dev \
libfmt-dev \
libssh-dev \
cmake git

echo "::endgroup::"

tool_name="far2l"
tool_version="2.5.0"
self_name="$tool_name-$tool_version"
self_toolset_name="build-glibc-p"
self_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/$self_toolset_name.tar.gz"

echo "::set-output name=tool_name::$tool_name"
echo "::set-output name=tool_version::$tool_version"

download_url="https://github.com/elfmz/far2l/archive/v_$tool_version.tar.gz"
echo "::group::prepare sources $download_url"

# Download release
mkdir -p "$dp0/release/build" && cd "$dp0/release"
wget "$download_url" -O "$tool_version.tar.gz"
tar -xf "$tool_version.tar.gz" && cd "far2l-v_$tool_version"

echo "::endgroup::"

echo "::group::build"

cmake_command=$(printf 'cmake -DUSEWX=no -DUSEUCD=no -DCMAKE_EXE_LINKER_FLAGS="%s" -DCMAKE_BUILD_TYPE=Release .' \
"-l:libuchardet.a -static-libstdc++ -static-libgcc")
echo ">> $cmake_command"
eval "$cmake_command"

cmake --build . --config Release

echo "::endgroup::"

cp -rf "$dp0/release/far2l-v_$tool_version/install/." "$dp0/release/build/"

cd "$dp0/release/build"
strip "$tool_name"
chmod +x "$tool_name"

{ printf '### %s
`wget -qO- %s | tar -xz`
SHA-256: %s
%s
<details>
<summary>ldd far2l</summary>
```
%s
```
</details>
<details>
<summary>ldd colorer.far-plug-wide</summary>
```
%s
```
</details>
%s
' "$self_toolset_name.tar.gz" \
"$self_url" \
"$(sha256sum < $tool_name)" \
"$("./$tool_name" --help | head -n2)" \
"$(ldd $tool_name)" \
"$(ldd "./Plugins/colorer/plug/colorer.far-plug-wide")" \
"$download_url"
} > "$self_toolset_name.md"

cat "$self_toolset_name.md"

tar -czvf "../$self_toolset_name.tar.gz" .
68 changes: 53 additions & 15 deletions far2l/build_glibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,45 @@ export DEBIAN_FRONTEND=noninteractive
echo "::group::install deps"

apt update
apt install -y build-essential libspdlog-dev patchelf wget gawk m4 libx11-dev libxi-dev libxerces-c-dev libuchardet-dev libssh-dev libssl-dev libnfs-dev libneon27-dev libarchive-dev libpcre3-dev cmake git
apt install -y \
build-essential \
libspdlog-dev \
patchelf \
wget \
gawk \
m4 \
libx11-dev \
libxi-dev \
libxerces-c-dev \
libuchardet-dev \
libssl-dev \
libnfs-dev \
libneon27-dev \
libarchive-dev \
libpcre3-dev \
libsmbclient-dev \
libfmt-dev \
libssh-dev \
cmake git

echo "::endgroup::"

tool_name="far2l"
tool_version="694878351f8201fa8682e68110ebef1cd9f5ad4b"
tool_version="2.5.0"
self_name="$tool_name-$tool_version"
self_toolset_name="build-glibc"
self_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/$self_toolset_name.tar.gz"

echo "::set-output name=tool_name::$tool_name"
echo "::set-output name=tool_version::$tool_version"

download_url="https://github.com/elfmz/far2l/archive/$tool_version.tar.gz"
download_url="https://github.com/elfmz/far2l/archive/v_$tool_version.tar.gz"
echo "::group::prepare sources $download_url"

# Download release
mkdir -p "$dp0/release" && cd "$dp0/release"
mkdir -p "$dp0/release/build" && cd "$dp0/release"
wget "$download_url" -O "$tool_version.tar.gz"
tar -xf "$tool_version.tar.gz" && cd "far2l-$tool_version"
tar -xf "$tool_version.tar.gz" && cd "far2l-v_$tool_version"

echo "::endgroup::"

Expand All @@ -46,31 +69,46 @@ without_plugins="\
-DTMPPANEL=no \
"

cmake_command=$(printf 'cmake -DUSEWX=no -DUSEUCD=no %s -DCMAKE_EXE_LINKER_FLAGS="%s" -DCMAKE_BUILD_TYPE=Release .' \
"$without_plugins" \
"-l:libuchardet.a -static-libstdc++ -static-libgcc")
cmake_command=$(printf 'cmake -DUSEWX=no %s -DUSEUCD=no -DCMAKE_EXE_LINKER_FLAGS="%s" -DCMAKE_BUILD_TYPE=Release .' \
"$without_plugins" \
"-l:libuchardet.a -static-libstdc++ -static-libgcc")
echo ">> $cmake_command"
eval "$cmake_command"

cmake --build . --config Release

echo "::endgroup::"

cp -rf "$dp0/release/far2l-$tool_version/install/." "$dp0/release/build/"
cp -rf "$dp0/release/far2l-v_$tool_version/install/." "$dp0/release/build/"

cd "$dp0/release/build"
strip "$tool_name"
chmod +x "$tool_name"

{ printf '### glibc version (without plugins):
{ printf '### %s (without plugins)
`wget -qO- %s | tar -xz`
ldd: %s
SHA-256: %s
%s
<details>
<summary>ldd far2l</summary>
```
%s
```
</details>
%s
' "$(ldd $tool_name)" "$(sha256sum < $tool_name)" "$("./$tool_name" --help | head -n2)" "$download_url"
} > build-glibc.md
cat build-glibc.md
' "$self_toolset_name.tar.gz" \
"$self_url" \
"$(sha256sum < $tool_name)" \
"$("./$tool_name" --help | head -n2)" \
"$(ldd $tool_name)" \
"$download_url"
} > "$self_toolset_name.md"

cat "$self_toolset_name.md"

tar -czvf ../build-glibc.tar.gz .
tar -czvf "../$self_toolset_name.tar.gz" .
Loading

0 comments on commit 87760da

Please sign in to comment.