Build arm64 variants of everything
except tarballs, since they are the same
This commit is contained in:
parent
2473ff0808
commit
be354de86b
62
.github/workflows/build.yml
vendored
62
.github/workflows/build.yml
vendored
@ -31,7 +31,17 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
build-installer:
|
build-installer:
|
||||||
runs-on: windows-2025
|
runs-on: windows-${{ matrix.image }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- msystem: CLANGARM64
|
||||||
|
arch_name: arm64
|
||||||
|
image: 11-arm
|
||||||
|
- msystem: CLANG64
|
||||||
|
arch_name: x86_64
|
||||||
|
image: 2022
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -41,7 +51,7 @@ jobs:
|
|||||||
- name: setup-msys2
|
- name: setup-msys2
|
||||||
uses: msys2/setup-msys2@v2 # zizmor: ignore[unpinned-uses]
|
uses: msys2/setup-msys2@v2 # zizmor: ignore[unpinned-uses]
|
||||||
with:
|
with:
|
||||||
msystem: CLANG64
|
msystem: ${{ matrix.msystem }}
|
||||||
update: true
|
update: true
|
||||||
install: >-
|
install: >-
|
||||||
tar
|
tar
|
||||||
@ -69,18 +79,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Create 'latest' Variants and Checksums
|
- name: Create 'latest' Variants and Checksums
|
||||||
run: |
|
run: |
|
||||||
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
mv msys2-base-${{ matrix.arch_name }}-[0-9]*.sfx.exe msys2-base-${{ matrix.arch_name }}-latest.sfx.exe
|
||||||
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
mv msys2-${{ matrix.arch_name }}-[0-9]*.exe msys2-${{ matrix.arch_name }}-latest.exe
|
||||||
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
if ("${{ matrix.arch_name }}" -ne "arm64") {
|
||||||
mv msys2-*.tar.zst msys2-base-x86_64-latest.tar.zst
|
mv msys2-*.tar.xz msys2-base-${{ matrix.arch_name }}-latest.tar.xz
|
||||||
mv msys2-*.packages.txt msys2-base-x86_64-latest.packages.txt
|
mv msys2-*.tar.zst msys2-base-${{ matrix.arch_name }}-latest.tar.zst
|
||||||
|
}
|
||||||
|
mv msys2-*.packages.txt msys2-base-${{ matrix.arch_name }}-latest.packages.txt
|
||||||
sha256sum.exe msys2-*
|
sha256sum.exe msys2-*
|
||||||
sha256sum.exe msys2-* > msys2-checksums.txt
|
sha256sum.exe msys2-* > msys2-${{ matrix.arch_name }}-checksums.txt
|
||||||
|
|
||||||
- name: Upload Results
|
- name: Upload Results
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: installer
|
name: installer-${{ matrix.arch_name }}
|
||||||
path: msys2-*
|
path: msys2-*
|
||||||
|
|
||||||
test-installer:
|
test-installer:
|
||||||
@ -90,7 +102,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [2022, 2025]
|
include:
|
||||||
|
- arch_name: arm64
|
||||||
|
image: 11-arm
|
||||||
|
- arch_name: x86_64
|
||||||
|
image: 2022
|
||||||
|
- arch_name: x86_64
|
||||||
|
image: 2025
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -99,11 +117,11 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: installer
|
name: installer-${{ matrix.arch_name }}
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
./msys2-${{ matrix.arch_name }}-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||||
|
|
||||||
- name: Test without Login Shell
|
- name: Test without Login Shell
|
||||||
run: |
|
run: |
|
||||||
@ -137,7 +155,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: installer
|
name: installer-x86_64
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: |
|
run: |
|
||||||
@ -163,7 +181,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
image: [2022, 2025, 11-arm]
|
include:
|
||||||
|
- arch_name: arm64
|
||||||
|
image: 11-arm
|
||||||
|
- arch_name: x86_64
|
||||||
|
image: 2022
|
||||||
|
- arch_name: x86_64
|
||||||
|
image: 2025
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -172,11 +196,11 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: installer
|
name: installer-${{ matrix.arch_name }}
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
./msys2-base-x86_64-latest.sfx.exe -y -oC:/msys2-install-test
|
./msys2-base-${{ matrix.arch_name }}-latest.sfx.exe -y -oC:/msys2-install-test
|
||||||
|
|
||||||
- name: Test without Login Shell
|
- name: Test without Login Shell
|
||||||
run: |
|
run: |
|
||||||
@ -207,7 +231,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: installer
|
name: installer-x86_64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: installer-arm64
|
||||||
|
|
||||||
- name: Upload Installers
|
- name: Upload Installers
|
||||||
env:
|
env:
|
||||||
|
|||||||
@ -3,9 +3,16 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ "$MSYSTEM" = "CLANGARM64" ]; then
|
||||||
|
ARCH="arm64"
|
||||||
|
CHECKSUM="c526e8c6cb5dc0d175778f1b6b67bd1571ba8a2cf6f6b36b7c8a8d3197ad2bac"
|
||||||
|
else
|
||||||
|
ARCH="x64"
|
||||||
|
CHECKSUM="d140094f0277b49a4e895159bd734da03cd2b60fb73a65e4151edfedc612981e"
|
||||||
|
fi
|
||||||
|
|
||||||
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
||||||
NAME="7z25.01-zstd-x64"
|
NAME="7z25.01-zstd-${ARCH}"
|
||||||
CHECKSUM="d140094f0277b49a4e895159bd734da03cd2b60fb73a65e4151edfedc612981e"
|
|
||||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
mkdir -p "$DIR/_cache"
|
mkdir -p "$DIR/_cache"
|
||||||
BASE="$DIR/_cache/$NAME"
|
BASE="$DIR/_cache/$NAME"
|
||||||
@ -17,7 +24,7 @@ if [ ! -d "$BASE" ]; then
|
|||||||
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Creat SFX installer
|
# Create SFX installer
|
||||||
INPUT="$1"
|
INPUT="$1"
|
||||||
OUTPUT="$2"
|
OUTPUT="$2"
|
||||||
TEMP="$OUTPUT.payload"
|
TEMP="$OUTPUT.payload"
|
||||||
@ -25,4 +32,4 @@ TEMP="$OUTPUT.payload"
|
|||||||
rm -f "$TEMP"
|
rm -f "$TEMP"
|
||||||
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
||||||
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
||||||
rm "$TEMP"
|
rm "$TEMP"
|
||||||
@ -11,6 +11,12 @@ _version="${_date}"
|
|||||||
_newmsysbase="${_build}/newmsys"
|
_newmsysbase="${_build}/newmsys"
|
||||||
_newmsys="${_newmsysbase}/msys64"
|
_newmsys="${_newmsysbase}/msys64"
|
||||||
|
|
||||||
|
if [ "$MSYSTEM" = "CLANGARM64" ]; then
|
||||||
|
_arch_name="arm64"
|
||||||
|
else
|
||||||
|
_arch_name="x86_64"
|
||||||
|
fi
|
||||||
|
|
||||||
create_installer_archive() {
|
create_installer_archive() {
|
||||||
echo "[Creating installer archive...]"
|
echo "[Creating installer archive...]"
|
||||||
|
|
||||||
@ -24,25 +30,25 @@ create_installer_archive() {
|
|||||||
create_archives() {
|
create_archives() {
|
||||||
echo "[Creating tarball...]"
|
echo "[Creating tarball...]"
|
||||||
pushd "${_newmsysbase}" > /dev/null
|
pushd "${_newmsysbase}" > /dev/null
|
||||||
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-x86_64-${_date}.tar" msys64
|
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" msys64
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
echo "[Creating xz archive...]"
|
echo "[Creating xz archive...]"
|
||||||
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-x86_64-${_date}.tar"
|
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
|
||||||
xz --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz"
|
xz --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.xz"
|
||||||
|
|
||||||
echo "[Creating zstd archive...]"
|
echo "[Creating zstd archive...]"
|
||||||
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-x86_64-${_date}.tar" -o "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
|
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" -o "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
|
||||||
zstd --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
|
zstd --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
|
||||||
|
|
||||||
rm "${_thisdir}/msys2-base-x86_64-${_date}.tar"
|
rm "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
|
||||||
}
|
}
|
||||||
|
|
||||||
create_sfx() {
|
create_sfx() {
|
||||||
echo "[Creating SFX...]"
|
echo "[Creating SFX...]"
|
||||||
|
|
||||||
pushd "${_newmsysbase}" > /dev/null
|
pushd "${_newmsysbase}" > /dev/null
|
||||||
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-x86_64-${_date}.sfx.exe"
|
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-${_arch_name}-${_date}.sfx.exe"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +69,7 @@ create_installer() {
|
|||||||
-p "${_ifwroot}/packages" \
|
-p "${_ifwroot}/packages" \
|
||||||
-c "${_ifwroot}/config/config.xml" \
|
-c "${_ifwroot}/config/config.xml" \
|
||||||
--offline-only \
|
--offline-only \
|
||||||
"${_thisdir}/msys2-x86_64-${_date}.exe" \
|
"${_thisdir}/msys2-${_arch_name}-${_date}.exe" \
|
||||||
-v
|
-v
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
@ -80,7 +86,7 @@ create_chroot_system() {
|
|||||||
pacman -Syu --root "${_newmsys}"
|
pacman -Syu --root "${_newmsys}"
|
||||||
pacman -S filesystem msys2-runtime --noconfirm --root "${_newmsys}"
|
pacman -S filesystem msys2-runtime --noconfirm --root "${_newmsys}"
|
||||||
pacman -S base --noconfirm --root "${_newmsys}"
|
pacman -S base --noconfirm --root "${_newmsys}"
|
||||||
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-x86_64-${_date}.packages.txt"
|
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-${_arch_name}-${_date}.packages.txt"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +104,9 @@ main() {
|
|||||||
create_installer_archive
|
create_installer_archive
|
||||||
create_installer
|
create_installer
|
||||||
|
|
||||||
create_archives
|
if [ "$_arch_name" != "arm64" ]; then
|
||||||
|
create_archives
|
||||||
|
fi
|
||||||
create_sfx
|
create_sfx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user