-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
275 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: 7-Zip | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
alpine-musl: | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/build-alpine.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
toolset: musl | ||
version: 3.16 | ||
|
||
alpine-musl-test: | ||
needs: alpine-musl | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/test-alpine.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
artifact: build-musl | ||
|
||
ubuntu-musl-test: | ||
needs: alpine-musl | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/test-ubuntu.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
artifact: build-musl | ||
|
||
windows-mingw: | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/build-windows-msbuild.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
|
||
test-windows: | ||
needs: windows-mingw | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/test-windows.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
artifact: build-mingw | ||
|
||
test-nanoserver: | ||
needs: windows-mingw | ||
if: ${{ vars.CURRENT_TOOL == github.workflow }} | ||
uses: ./.github/workflows/test-nanoserver.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
artifact: build-mingw | ||
|
||
release: | ||
needs: [alpine-musl-test, | ||
ubuntu-musl-test, | ||
test-windows, | ||
test-nanoserver] | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
workflow: ${{ github.workflow }} | ||
tool_version: '23.01' | ||
prepare_body: | | ||
bsdtar -Oxf ./build-musl/build-musl.tar.gz build-musl.md >> body.md | ||
bsdtar -Oxf ./build-mingw/build-mingw.tar.gz build-mingw.md >> body.md | ||
artifacts: ./build-musl/build-musl.tar.gz,./build-mingw/build-mingw.tar.gz | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,33 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
workflow: | ||
required: true | ||
type: string | ||
toolset: | ||
required: false | ||
type: string | ||
default: 'mingw' | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Enable Developer Command Prompt | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: amd64 | ||
|
||
- name: build ${{ inputs.workflow }}-windows-${{ inputs.toolset }} | ||
run: | | ||
.tools\busybox64.exe sh ${{ inputs.workflow }}\build_${{ inputs.toolset }}.sh | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-${{ inputs.toolset }} | ||
path: ./${{ inputs.workflow }}/release/build-${{ inputs.toolset }}.tar.gz |
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,56 @@ | ||
#!/bin/bash | ||
dp0="$(realpath "$(dirname "$0")")" | ||
set -e | ||
|
||
tool_name="7-Zip" | ||
tool_version="23.01" | ||
self_toolset_name="build-mingw" | ||
release_version_dirpath="$dp0/release/build" | ||
|
||
mkdir -p "$release_version_dirpath" && cd "$dp0/release" | ||
|
||
download_url="https://www.7-zip.org/a/7z2301-src.tar.xz" | ||
echo "::group::prepare sources $download_url" | ||
|
||
"$dp0/../.tools/download_bsdtar.sh" | ||
bsdtar="$dp0/release/bsdtar" | ||
|
||
# wget failed: ssl_client: TLS error from peer (alert code 80): 80 | ||
curl --location "$download_url" --output "tool-$tool_version.tar.xz" | ||
"$bsdtar" -xf "tool-$tool_version.tar.xz" | ||
|
||
echo "::endgroup::" | ||
|
||
echo "::group::build" | ||
|
||
cd "$dp0/release/CPP/7zip/Bundles/Alone2" | ||
nmake | ||
cp -f "./x64/7zz.exe" "$release_version_dirpath/" | ||
|
||
echo "::endgroup::" | ||
|
||
cd "$release_version_dirpath" | ||
|
||
strip 7zz.exe | ||
|
||
{ printf '### %s | ||
%s | ||
SHA-256: %s | ||
<details> | ||
<summary>7zz i</summary> | ||
``` | ||
%s | ||
``` | ||
</details> | ||
%s | ||
' "$self_toolset_name.tar.gz" "$(./7zz.exe | head -2)" "$(sha256sum 7zz.exe)" "$(./7zz.exe i)" "$download_url" | ||
} > "$self_toolset_name.md" | ||
|
||
cat "$self_toolset_name.md" | ||
|
||
"$bsdtar" -czvf "../$self_toolset_name.tar.gz" . |
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,63 @@ | ||
#!/bin/bash | ||
dp0="$(realpath "$(dirname "$0")")" | ||
set -e | ||
|
||
echo "::group::install deps" | ||
|
||
apk update | ||
apk add --no-cache alpine-sdk make linux-headers | ||
|
||
echo "::endgroup::" | ||
|
||
tool_name="7-Zip" | ||
tool_version="23.01" | ||
self_toolset_name="build-musl" | ||
release_version_dirpath="$dp0/release/build" | ||
|
||
mkdir -p "$release_version_dirpath" && cd "$dp0/release" | ||
|
||
download_url="https://www.7-zip.org/a/7z2301-src.tar.xz" | ||
echo "::group::prepare sources $download_url" | ||
|
||
"$dp0/../.tools/download_bsdtar.sh" | ||
bsdtar="$dp0/release/bsdtar" | ||
|
||
# wget failed: ssl_client: TLS error from peer (alert code 80): 80 | ||
curl --location "$download_url" --output "tool-$tool_version.tar.xz" | ||
"$bsdtar" -xf "tool-$tool_version.tar.xz" | ||
|
||
git apply "$dp0/release/0001-static.patch" | ||
|
||
echo "::endgroup::" | ||
|
||
echo "::group::build" | ||
|
||
cd "$dp0/release/CPP/7zip/Bundles/Alone2" | ||
make -j -f makefile.gcc | ||
cp -f "./_o/7zz" "$release_version_dirpath/" | ||
|
||
echo "::endgroup::" | ||
|
||
cd "$release_version_dirpath" | ||
|
||
strip 7zz | ||
|
||
{ printf '### %s | ||
%s | ||
SHA-256: %s | ||
<details> | ||
<summary>7zz i</summary> | ||
``` | ||
%s | ||
``` | ||
</details> | ||
' "$self_toolset_name.tar.gz" "$(./7zz | head -2)" "$(sha256sum 7zz)" "$(./7zz i)" | ||
} > "$self_toolset_name.md" | ||
|
||
cat "$self_toolset_name.md" | ||
|
||
"$bsdtar" -czvf "../$self_toolset_name.tar.gz" . |
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,38 @@ | ||
From 1d9a48d5589fd888d63f363ed654f81c1693bec7 Mon Sep 17 00:00:00 2001 | ||
From: Reshetnikov Alexandr <[email protected]> | ||
Date: Sun, 6 Aug 2023 22:01:23 +0400 | ||
Subject: [PATCH] + static - affinity | ||
|
||
--- | ||
C/Threads.h | 1 - | ||
CPP/7zip/7zip_gcc.mak | 2 ++ | ||
2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/C/Threads.h b/C/Threads.h | ||
index c6aa6a8..7abb2ab 100644 | ||
--- a/C/Threads.h | ||
+++ b/C/Threads.h | ||
@@ -12,7 +12,6 @@ | ||
#if defined(__linux__) | ||
#if !defined(__APPLE__) && !defined(_AIX) && !defined(__ANDROID__) | ||
#ifndef Z7_AFFINITY_DISABLE | ||
-#define Z7_AFFINITY_SUPPORTED | ||
// #pragma message(" ==== Z7_AFFINITY_SUPPORTED") | ||
// #define _GNU_SOURCE | ||
#endif | ||
diff --git a/CPP/7zip/7zip_gcc.mak b/CPP/7zip/7zip_gcc.mak | ||
index a8eb6e3..bf3e671 100644 | ||
--- a/CPP/7zip/7zip_gcc.mak | ||
+++ b/CPP/7zip/7zip_gcc.mak | ||
@@ -68,6 +68,8 @@ endif | ||
endif | ||
endif | ||
|
||
+LDFLAGS_STATIC_2 = -static | ||
+ | ||
LDFLAGS_STATIC = -DNDEBUG $(LDFLAGS_STATIC_2) | ||
|
||
ifndef O | ||
-- | ||
2.37.2.windows.2 | ||
|
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,9 @@ | ||
#!/bin/bash | ||
|
||
testVersion() { | ||
assertEquals " | ||
7-Zip (z) 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20" "$(../bin/7zz | head -2)" | ||
} | ||
|
||
# Load and run shUnit2. | ||
source "../.tests/shunit2/shunit2" |
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,9 @@ | ||
#!/bin/bash | ||
|
||
testVersion() { | ||
assertEquals " | ||
7-Zip (z) 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20" "$(../bin/7zz.exe | dos2unix | head -2)" | ||
} | ||
|
||
# Load and run shUnit2. | ||
source "../.tests/shunit2/shunit2" |
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