Skip to content

Commit 1a962c5

Browse files
committed
Publish cmake and ninja as zips (2/n)
There is built-in fast support for extracting zips in DkCoder's dk.exe using MlFront_ZipFile. dk.exe must bootstrap cmake and ninja for the (legacy?) cmake user and system scripts. But for bootstrapping we shouldn't have to add tar.gz support. + Rename Linux jobs so clear they are for static binaries + Change CMake Linux .tar.gz to .zip + Add rearchive-as-zip job for Darwin
1 parent 4113a57 commit 1a962c5

File tree

2 files changed

+44
-13
lines changed

2 files changed

+44
-13
lines changed

.github/workflows/cmake-build.yml

+41-10
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
# #
1212
##########################################################################
1313

14-
name: Publish CMake as a tarball with static binaries
14+
name: Publish CMake suitable for dk.exe bootstrap
1515

1616
on:
1717
push:
1818

1919
jobs:
20-
build:
20+
build-static:
2121
runs-on: ubuntu-latest
2222

2323
strategy:
@@ -36,6 +36,9 @@ jobs:
3636

3737
name: ${{ matrix.dkml_target_abi }}
3838
steps:
39+
- name: Validation
40+
run: zip --version
41+
3942
- name: Set up QEMU
4043
uses: docker/setup-qemu-action@v3
4144

@@ -59,21 +62,48 @@ jobs:
5962
if: matrix.testable
6063
run: out/usr/local/cmake/bin/cmake --version
6164

62-
- name: Bundle cmake-${{ matrix.dkml_target_abi }}.tar.gz
63-
run: X=$(pwd) && cd out/usr/local/cmake && tar cfz $X/cmake-${{ matrix.dkml_target_abi }}.tar.gz *
65+
- name: Bundle cmake-${{ matrix.dkml_target_abi }}.zip
66+
run: X=$(pwd) && cd out/usr/local && zip -y -r $X/cmake-${{ matrix.dkml_target_abi }} cmake
6467

65-
- name: Upload cmake tarball
68+
- name: Upload cmake archives
6669
uses: actions/upload-artifact@v4
6770
with:
6871
retention-days: 30
6972
name: cmake-${{ matrix.dkml_target_abi }}
70-
path: cmake-${{ matrix.dkml_target_abi }}.tar.gz
73+
path: cmake-${{ matrix.dkml_target_abi }}.zip
74+
75+
rearchive-as-zip:
76+
runs-on: ubuntu-latest
77+
78+
strategy:
79+
matrix:
80+
include:
81+
- abi: darwin_universal
82+
cksum256: a988e2a69c1d105987f12782ee0fa80d6be941b3e1a68b4bd6a661f0fdb56d75
83+
cmake_majminpat_ver: 3.25.2
84+
cmake_base_suffix: macos10.10-universal
85+
86+
name: ${{ matrix.abi }}
87+
steps:
88+
- name: Download and repack
89+
run: |
90+
curl -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v${cmake_majminpat_ver}/cmake-${cmake_majminpat_ver}-${cmake_base_suffix}.tar.gz
91+
install -d dist && cd dist
92+
tar xfz ../cmake.tar.gz
93+
zip -y -r ../cmake-${{ matrix.abi }} *
94+
95+
- name: Upload cmake zip
96+
uses: actions/upload-artifact@v4
97+
with:
98+
retention-days: 30
99+
name: cmake-${{ matrix.abi }}
100+
path: cmake-${{ matrix.abi }}.zip
71101

72102
publish:
73103
permissions:
74104
contents: write
75105
runs-on: ubuntu-latest
76-
needs: build
106+
needs: build-static
77107
# We never want the DkCoder version numbers to conflict with the CMake releases.
78108
# So use tags that are real CMake versions. Example: cmake-3.25.2
79109
if: startsWith(github.ref, 'refs/tags/cmake-')
@@ -87,6 +117,7 @@ jobs:
87117
uses: softprops/action-gh-release@v2
88118
with:
89119
files: |
90-
cmake-linux_x86_64.tar.gz
91-
cmake-linux_x86.tar.gz
92-
cmake-linux_arm64.tar.gz
120+
cmake-linux_x86_64.zip
121+
cmake-linux_x86.zip
122+
cmake-linux_arm64.zip
123+
cmake-darwin_universal.zip

.github/workflows/ninja-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
# #
1212
##########################################################################
1313

14-
name: Publish ninja-build as a static binary
14+
name: Publish ninja-build suitable for dk.exe bootstrap
1515

1616
on:
1717
push:
1818

1919
jobs:
20-
build:
20+
build-static:
2121
runs-on: ubuntu-latest
2222

2323
strategy:
@@ -73,7 +73,7 @@ jobs:
7373
permissions:
7474
contents: write
7575
runs-on: ubuntu-latest
76-
needs: build
76+
needs: build-static
7777
# We never want the DkCoder version numbers to conflict with the Ninja releases.
7878
# So use tags that are real Ninja versions. Example: ninja-1.12.1
7979
if: startsWith(github.ref, 'refs/tags/ninja-')

0 commit comments

Comments
 (0)