Skip to content

Commit 438b99e

Browse files
authored
feat: enhance macOS support in CI and publish workflows; update README to reflect macOS availability (#1122)
1 parent b82acc2 commit 438b99e

File tree

3 files changed

+34
-124
lines changed

3 files changed

+34
-124
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ jobs:
7070
fail-fast: false
7171
matrix:
7272
platform: ["windows-latest", "ubuntu-22.04", "macos-latest"]
73-
include:
74-
- platform: "macos-latest"
75-
allow-failure: true # macOS support is experimental/in-progress
7673
runs-on: ${{ matrix.platform }}
77-
continue-on-error: ${{ matrix.allow-failure == true }}
7874
steps:
7975
- name: Checkout repository
8076
uses: actions/checkout@v6
@@ -104,12 +100,7 @@ jobs:
104100
fail-fast: false
105101
matrix:
106102
platform: ["windows-latest", "ubuntu-22.04", "macos-latest"]
107-
include:
108-
- platform: "macos-latest"
109-
# macOS support is experimental/in-progress
110-
allow-failure: true
111103
runs-on: ${{ matrix.platform }}
112-
continue-on-error: ${{ matrix.allow-failure == true }}
113104
steps:
114105
- name: Checkout repository
115106
uses: actions/checkout@v6
@@ -140,11 +131,7 @@ jobs:
140131
fail-fast: false
141132
matrix:
142133
platform: ["windows-latest", "ubuntu-22.04", "macos-latest"]
143-
include:
144-
- platform: "macos-latest"
145-
allow-failure: true # macOS support is experimental/in-progress
146134
runs-on: ${{ matrix.platform }}
147-
continue-on-error: ${{ matrix.allow-failure == true }}
148135
steps:
149136
- name: Checkout repository
150137
uses: actions/checkout@v6
@@ -326,11 +313,7 @@ jobs:
326313
fail-fast: false
327314
matrix:
328315
platform: ["windows-latest", "ubuntu-22.04", "macos-latest"]
329-
include:
330-
- platform: "macos-latest"
331-
allow-failure: true # macOS support is experimental/in-progress; failures do not block CI
332316
runs-on: ${{ matrix.platform }}
333-
continue-on-error: ${{ matrix.allow-failure == true }}
334317
steps:
335318
- name: Checkout repository
336319
uses: actions/checkout@v6

.github/workflows/publish.yml

Lines changed: 31 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ jobs:
2222
- platform: "ubuntu-22.04"
2323
args: ""
2424
os-name: "linux"
25+
- platform: "macos-latest"
26+
args: "--target aarch64-apple-darwin --skip-stapling"
27+
os-name: "macos-aarch64"
28+
rust-targets: "aarch64-apple-darwin x86_64-apple-darwin"
29+
- platform: "macos-latest"
30+
args: "--target x86_64-apple-darwin --skip-stapling"
31+
os-name: "macos-x64"
32+
rust-targets: "aarch64-apple-darwin x86_64-apple-darwin"
2533

2634
runs-on: ${{ matrix.platform }}
2735
steps:
@@ -53,6 +61,7 @@ jobs:
5361
uses: ./.github/actions/setup-rust
5462
with:
5563
components: ""
64+
targets: ${{ matrix.rust-targets || '' }}
5665

5766
- name: Generate licenses.json
5867
run: npx license-checker --production --json > licenses.json
@@ -74,6 +83,10 @@ jobs:
7483
node .github/scripts/update-tauri-config.ts \
7584
--tag "$TAG" \
7685
--sign "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a hardware-monitor -c hv-certificate %1"
86+
elif [ "${{ runner.os }}" = "macOS" ]; then
87+
node .github/scripts/update-tauri-config.ts \
88+
--tag "$TAG" \
89+
--sign ""
7790
else
7891
node .github/scripts/update-tauri-config.ts \
7992
--tag "$TAG"
@@ -83,6 +96,17 @@ jobs:
8396
if: ${{ env.ENABLE_WINDOWS_SIGNING == 'true' && matrix.platform == 'windows-latest' }}
8497
run: cargo install trusted-signing-cli
8598

99+
- name: Setup Apple API Key for notarization
100+
if: runner.os == 'macOS'
101+
shell: bash
102+
run: |
103+
KEY_DIR="${RUNNER_TEMP}/private_keys"
104+
mkdir -p "$KEY_DIR"
105+
APPLE_API_KEY_PATH="$KEY_DIR/AuthKey_${{ secrets.APPLE_API_KEY }}.p8"
106+
printf '%s' "${{ secrets.APPLE_API_KEY_CONTENT }}" > "$APPLE_API_KEY_PATH"
107+
chmod 600 "$APPLE_API_KEY_PATH"
108+
echo "APPLE_API_KEY_PATH=$APPLE_API_KEY_PATH" >> "$GITHUB_ENV"
109+
86110
# Generate THIRD_PARTY_LICENSES file
87111
# Generate here to include in Tauri build bundle
88112
- name: Install cargo-license
@@ -99,6 +123,12 @@ jobs:
99123
AZURE_TENANT_ID: ${{ env.ENABLE_WINDOWS_SIGNING == 'true' && matrix.platform == 'windows-latest' && secrets.AZURE_TENANT_ID || '' }}
100124
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
101125
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
126+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
127+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
128+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
129+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
130+
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
131+
APPLE_API_KEY_PATH: ${{ env.APPLE_API_KEY_PATH }}
102132
with:
103133
tagName: ${{ github.ref_name }}
104134
releaseName: ${{ github.ref_name }}
@@ -139,109 +169,7 @@ jobs:
139169
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140170
shell: bash
141171

142-
publish-tauri-macos:
143-
if: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') }}
144-
permissions:
145-
contents: write
146-
strategy:
147-
fail-fast: false
148-
matrix:
149-
include:
150-
- platform: 'macos-latest' # for Arm based macs (M1 and above).
151-
args: '--target aarch64-apple-darwin --skip-stapling'
152-
os-name: 'macos-aarch64'
153-
- platform: 'macos-latest' # for Intel based macs.
154-
args: '--target x86_64-apple-darwin --skip-stapling'
155-
os-name: 'macos-x64'
156-
157-
runs-on: ${{ matrix.platform }}
158-
steps:
159-
- name: Checkout repository
160-
uses: actions/checkout@v6
161-
162-
- name: Setup Node.js
163-
uses: ./.github/actions/setup-node
164-
with:
165-
setup-safe-chain: false
166-
167-
- name: Setup Rust
168-
uses: ./.github/actions/setup-rust
169-
with:
170-
targets: "aarch64-apple-darwin x86_64-apple-darwin"
171-
172-
- name: Generate licenses.json
173-
run: npx license-checker --production --json > licenses.json
174-
175-
- name: Check licenses
176-
run: node --experimental-strip-types .github/scripts/check-licenses.ts licenses.json
177-
178-
- name: Export VERSION for later steps
179-
shell: bash
180-
run: |
181-
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
182-
183-
- name: Update tauri.conf.json using Node.js script
184-
shell: bash
185-
run: |
186-
TAG="${GITHUB_REF_NAME}" # v1.x.x
187-
188-
node .github/scripts/update-tauri-config.ts \
189-
--tag "$TAG" \
190-
--sign ""
191-
192-
- name: Setup Apple API Key for notarization
193-
shell: bash
194-
run: |
195-
KEY_DIR="${RUNNER_TEMP}/private_keys"
196-
mkdir -p "$KEY_DIR"
197-
APPLE_API_KEY_PATH="$KEY_DIR/AuthKey_${{ secrets.APPLE_API_KEY }}.p8"
198-
printf '%s' "${{ secrets.APPLE_API_KEY_CONTENT }}" > "$APPLE_API_KEY_PATH"
199-
chmod 600 "$APPLE_API_KEY_PATH"
200-
echo "APPLE_API_KEY_PATH=$APPLE_API_KEY_PATH" >> "$GITHUB_ENV"
201-
202-
# Generate THIRD_PARTY_LICENSES file
203-
# Generate here to include in Tauri build bundle
204-
- name: Cache cargo-license binary
205-
id: cache-cargo-license
206-
uses: actions/cache@v5
207-
with:
208-
path: ~/.cargo/bin/cargo-license
209-
key: cargo-license-${{ runner.os }}-v1
210-
211-
- name: Install cargo-license
212-
if: steps.cache-cargo-license.outputs.cache-hit != 'true'
213-
run: cargo install cargo-license
214-
215-
- name: Generate THIRD_PARTY_NOTICES
216-
run: node --experimental-strip-types .github/scripts/generate-licenses.ts tmp
217-
218-
- uses: tauri-apps/tauri-action@73fb865345c54760d875b94642314f8c0c894afa # v0.6.1
219-
env:
220-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
221-
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
222-
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
223-
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
224-
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
225-
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
226-
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
227-
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
228-
APPLE_API_KEY_PATH: ${{ env.APPLE_API_KEY_PATH }}
229-
with:
230-
tagName: ${{ github.ref_name }}
231-
releaseName: ${{ github.ref_name }}
232-
releaseDraft: true
233-
prerelease: true
234-
args: ${{ matrix.args }}
235-
236-
- name: Upload THIRD_PARTY_NOTICES.md
237-
run: |
238-
mv ./tmp/THIRD_PARTY_NOTICES.md ./tmp/THIRD_PARTY_NOTICES_${{ matrix.os-name }}.md
239-
gh release upload "${{ github.ref_name }}" ./tmp/THIRD_PARTY_NOTICES_${{ matrix.os-name }}.md
240-
env:
241-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
242-
shell: bash
243-
244172
- name: Cleanup Apple API Key
245-
if: always()
173+
if: ${{ always() && runner.os == 'macOS' }}
246174
shell: bash
247175
run: rm -rf "${RUNNER_TEMP}/private_keys"

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
[![Release](https://img.shields.io/github/v/release/shm11C3/HardwareVisualizer?&display_name=release)](https://github.com/shm11C3/HardwareVisualizer/releases)
66
[![CI develop](https://github.com/shm11C3/HardwareVisualizer/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/shm11C3/HardwareVisualizer/actions/workflows/ci.yml)
7-
![Platforms](https://img.shields.io/badge/platform-Windows%20|%20Linux-blue)
8-
![Platforms](https://img.shields.io/badge/platform-MacOS%20(beta)-orange)
7+
![Platforms](https://img.shields.io/badge/platform-Windows%20|%20Linux%20|%20MacOS-blue)
98
![Downloads](https://img.shields.io/github/downloads/shm11C3/HardwareVisualizer/total)
109
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
1110
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fshm11C3%2FHardwareVisualizer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fshm11C3%2FHardwareVisualizer?ref=badge_shield)
@@ -132,7 +131,7 @@ After launching the app:
132131
| ------- | ------ | ------------------------------------------------------------------------------------- |
133132
| Windows || [Download](https://hardviz.com/#download) |
134133
| Linux || [Download](https://hardviz.com/#download) |
135-
| macOS | 🚧 | WIP (beta: [GitHub Releases](https://github.com/shm11C3/HardwareVisualizer/releases)) |
134+
| macOS | | [Download](https://hardviz.com/#download) |
136135
137136
## Screenshots
138137
@@ -185,7 +184,7 @@ Flexible graph customization available.
185184
186185
| Item | Target |
187186
| ---------------------------- | ----------- |
188-
| macOS Support | In Progress |
187+
| macOS Support | ✅ Done |
189188
| AMD compatible | Research |
190189
| Fan / Temp Full Cross Vendor | Research |
191190
| Game Mode | Planned |

0 commit comments

Comments
 (0)