Skip to content

Commit e6e1df2

Browse files
committed
Updated CI workflows to produce tar/zip files for releases.
1 parent f63fa13 commit e6e1df2

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

.github/workflows/build_macos-universal.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
3333
- name: Install Boost for x86_64
3434
run: |
35-
$VCPKG_ROOT/vcpkg install --triplet=x64-osx
35+
$VCPKG_ROOT/vcpkg install boost --triplet=x64-osx
3636
3737
- name: Install Boost for arm64
3838
run: |
39-
$VCPKG_ROOT/vcpkg install --triplet=arm64-osx
39+
$VCPKG_ROOT/vcpkg install boost --triplet=arm64-osx
4040
41-
- name: Configure Build with vcpkg for x86_64
41+
- name: Configure Build for x86_64
4242
run: |
4343
mkdir -p build_x86_64
4444
cd build_x86_64
@@ -51,7 +51,7 @@ jobs:
5151
cd build_x86_64
5252
cmake --build .
5353
54-
- name: Configure Build with vcpkg for arm64
54+
- name: Configure Build for arm64
5555
run: |
5656
mkdir -p build_arm64
5757
cd build_arm64
@@ -67,25 +67,31 @@ jobs:
6767
- name: Combine the binaries into a universal binary
6868
run: |
6969
mkdir -p artifacts
70-
lipo -create -output artifacts/shinysocks-macos \
70+
mkdir -p build_universal
71+
lipo -create -output build_universal/shinysocks-macos \
7172
build_x86_64/bin/shinysocks \
7273
build_arm64/bin/shinysocks
7374
7475
- name: Verify Universal Binary
7576
run: |
76-
file artifacts/shinysocks-macos
77+
file build_universal/shinysocks-macos
78+
79+
- name: Make tarfile
80+
run: |
81+
cp -v shinysocks.conf build_universal/ # Ensure config file is copied
82+
tar -czf artifacts/shinysocks-macos.tar.gz -C build_universal shinysocks-macos shinysocks.conf
7783
7884
- name: Archive Artifacts
7985
uses: actions/upload-artifact@v4
8086
with:
81-
name: logfault-macos
82-
path: artifacts/*
87+
name: shinysocks-macos
88+
path: artifacts/shinysocks-macos.tar.gz
8389
retention-days: 1
8490

8591
- name: Upload Release Artifact
8692
if: github.event_name == 'release'
8793
uses: softprops/action-gh-release@v2
8894
with:
89-
files: artifacts/shinysocks-macos
95+
files: artifacts/shinysocks-macos.tar.gz
9096
name: shinysocks-macos
9197
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ jobs:
1717
- os: ubuntu-latest
1818
compiler: gcc
1919
releaseArtifact: shinysocks-ubuntu
20-
- os: ubuntu-latest
21-
compiler: clang
2220
- os: windows-latest
2321
compiler: msvc
2422
releaseArtifact: shinysocks-win64
25-
- os: macos-latest
26-
compiler:
2723

2824
steps:
2925
- name: Checkout code
@@ -55,11 +51,6 @@ jobs:
5551
vcpkg: true
5652
cppcheck: false
5753

58-
- name: Install compiler for Macos
59-
if: startsWith(matrix.os, 'macos')
60-
run: |
61-
brew install llvm
62-
6354
- name: Prepare the PATH
6455
run: |
6556
if [[ "${{ runner.os }}" == "Windows" ]]; then
@@ -93,8 +84,6 @@ jobs:
9384
run: |
9485
if [[ "${{ runner.os }}" == "Windows" ]]; then
9586
choco install curl
96-
elif [[ "${{ runner.os }}" == "macOS" ]]; then
97-
brew install curl
9887
else
9988
sudo apt-get install -y curl
10089
fi
@@ -116,8 +105,12 @@ jobs:
116105
- name: Prepare artifacts
117106
run: |
118107
mkdir -p artifacts
119-
cp build/bin/* artifacts/
120-
cp shinysocks.conf artifacts/
108+
if [[ "${{ runner.os }}" == "Windows" ]]; then
109+
powershell Compress-Archive -Path build/bin/* -DestinationPath artifacts/${{ matrix.releaseArtifact }}.zip
110+
else
111+
tar -czf artifacts/${{ matrix.releaseArtifact }}.tar.gz -C build/bin .
112+
fi
113+
shell: bash
121114

122115
- name: Upload CI Artifacts
123116
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)