Skip to content

Commit 2d22297

Browse files
committed
CI: macOS: create the .dmg, and use it for nightly releases.
1 parent 160a60c commit 2d22297

File tree

4 files changed

+79
-31
lines changed

4 files changed

+79
-31
lines changed

.github/workflows/make.yml

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ jobs:
3434
- nul: /dev/null
3535
- runs-on: macos
3636
fasmg: /source/macos/x64/fasmg
37+
install-output-ext: "dmg"
3738
- runs-on: windows
3839
fasmg: /fasmg.exe
3940
env: "env:"
4041
exe: .exe
4142
nul: nul
4243
ldflags: LDFLAGS="-static-libgcc -static-libstdc++ -static"
44+
install-output-ext: "zip"
4345
- runs-on: ubuntu
4446
fasmg: /fasmg.x64
47+
install-output-ext: "tar.gz"
4548
runs-on: ${{matrix.runs-on}}-latest
4649
steps:
4750
- name: Prepare Build Environment
@@ -151,29 +154,54 @@ jobs:
151154
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain
152155
/usr/bin/codesign --deep --force --verify --verbose --sign "$MACOS_CODESIGN_IDENT" --timestamp --options runtime $CEDEV_BIN/*
153156
154-
- name: Tar toolchain
155-
if: runner.os != 'Windows'
157+
- name: "[macOS install] Create the DMG"
158+
if: runner.os == 'macOS'
159+
run: |
160+
brew install create-dmg;
161+
cp -a "${CEDEV}" "${TOOLCHAIN_PATH}/resources/macOS/dmg/contents/";
162+
create-dmg \
163+
--codesign "Developer ID Application: Adrien Bertrand (Z3B7V95FNU)" \
164+
--volname "CE Programming Toolchain" \
165+
--volicon "${TOOLCHAIN_PATH}/resources/macOS/dmg/icon.icns" \
166+
--background "${TOOLCHAIN_PATH}/resources/macOS/dmg/background.png" \
167+
--window-pos 200 120 \
168+
--window-size 600 400 \
169+
--icon-size 64 \
170+
--icon "Readme.txt" 125 120 \
171+
--icon "CEdev" 125 275 \
172+
"CEdev-${{runner.os}}.${{matrix.install-output-ext}}" \
173+
"${TOOLCHAIN_PATH}/resources/macOS/dmg/contents"
174+
175+
- name: "[macOS install] Notarize DMG (master branch push only)"
176+
if: runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/master'
177+
uses: adriweb/xcode-notarize-please@v1.1
178+
with:
179+
product-path: CEdev-${{runner.os}}.${{matrix.install-output-ext}}
180+
appstore-connect-username: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
181+
appstore-connect-password: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
182+
primary-bundle-id: 'com.adriweb.CEToolchain'
183+
184+
- name: "[macOS install] Staple DMG (master branch push only)"
185+
if: runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/master'
186+
uses: devbotsxyz/xcode-staple@v1.0.0
187+
with:
188+
product-path: CEdev-${{runner.os}}.${{matrix.install-output-ext}}
189+
190+
- name: "[Linux] Tar toolchain"
191+
if: runner.os == 'Linux'
156192
run: |
157193
chmod +x ${{env.CEDEV_BIN}}/*
158-
tar -C ${{env.CEDEV}}/.. -czvf CEdev-${{runner.os}}.tar.gz CEdev
159-
- name: Zip toolchain
194+
tar -C ${{env.CEDEV}}/.. -czvf CEdev-${{runner.os}}.${{matrix.install-output-ext}} CEdev
195+
- name: "[Windows] Zip toolchain"
160196
if: runner.os == 'Windows'
161197
run: |
162-
cd ${{env.CEDEV}}/.. && 7z a -tzip CEdev-${{runner.os}}.zip CEdev
163-
164-
- name: Upload Linux/MacOS CEdev
165-
if: runner.os != 'Windows'
166-
uses: actions/upload-artifact@v2
167-
with:
168-
name: CEdev-${{runner.os}}
169-
path: CEdev-${{runner.os}}.tar.gz
198+
cd ${{env.CEDEV}}/.. && 7z a -tzip CEdev-${{runner.os}}.${{matrix.install-output-ext}} CEdev
170199
171-
- name: Upload Windows CEdev
172-
if: runner.os == 'Windows'
200+
- name: Upload CEdev
173201
uses: actions/upload-artifact@v2
174202
with:
175203
name: CEdev-${{runner.os}}
176-
path: CEdev-${{runner.os}}.zip
204+
path: CEdev-${{runner.os}}.${{matrix.install-output-ext}}
177205

178206
- name: Upload Libraries
179207
uses: actions/upload-artifact@v2
@@ -203,8 +231,14 @@ jobs:
203231
name: CEdev-${{runner.os}}
204232
path: ${{github.workspace}}
205233
- name: Extract Artifact Contents
206-
if: runner.os != 'Windows'
234+
if: runner.os == 'Linux'
207235
run: tar -xvf CEdev-${{runner.os}}.tar.gz
236+
- name: Extract Artifact Contents
237+
if: runner.os == 'macOS'
238+
run: |
239+
hdiutil attach CEdev-${{runner.os}}.dmg
240+
cp -a "/Volumes/CE Programming Toolchain/CEdev" ./
241+
umount "/Volumes/CE Programming Toolchain"
208242
- name: Extract Artifact Contents
209243
if: runner.os == 'Windows'
210244
run: |
@@ -373,6 +407,11 @@ jobs:
373407
with:
374408
name: CEdev-Windows
375409
path: ${{github.workspace}}
410+
- name: Download CEdev macOS
411+
uses: actions/download-artifact@v3
412+
with:
413+
name: CEdev-macOS
414+
path: ${{github.workspace}}
376415
- name: Download CE Libraries
377416
uses: actions/download-artifact@v3
378417
with:
@@ -383,6 +422,7 @@ jobs:
383422
run: |
384423
mv CEdev-Linux.tar.gz CEdev-Linux-nightly.tar.gz
385424
mv CEdev-Windows.zip CEdev-Windows-nightly.zip
425+
mv CEdev-macOS.dmg CEdev-macOS-nightly.dmg
386426
mv clibs.8xg clibs-nightly.8xg
387427
388428
- name: Update nightly release
@@ -394,19 +434,5 @@ jobs:
394434
files: |
395435
CEdev-Linux-nightly.tar.gz
396436
CEdev-Windows-nightly.zip
437+
CEdev-macOS-nightly.dmg
397438
clibs-nightly.8xg
398-
399-
nightly-macos:
400-
runs-on: macos-latest
401-
needs: test
402-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
403-
404-
steps:
405-
- name: Install create-dmg
406-
run: brew install create-dmg
407-
408-
- name: Download CEdev Mac
409-
uses: actions/download-artifact@v3
410-
with:
411-
name: CEdev-macOS
412-
path: ${{github.workspace}}

resources/macOS/dmg/background.png

207 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CE C toolchain - macOS release install notes
2+
--------------------------------------------
3+
4+
If you're updating from a previous toolchain, back up any of your own files already present in your CEdev directory (which may be in ~/CEdev or /opt/CEdev), somewhere else temporarily.
5+
6+
Then follow the getting started guide: https://ce-programming.github.io/toolchain/static/getting-started.html (When it says "Extract the archive", it's about the dmg for us mac users, so you'll just want to drag'n'drop the CEdev folder in your home directory, for instance, which is /Users/YOURNAME/ (or "~" as a shortcut). You can open a new finder window and go there by pressing Cmd-Shift-H.
7+
8+
9+
Source code:
10+
------------
11+
https://github.com/CE-Programming/toolchain/
12+
13+
14+
Documentation etc.:
15+
-------------------
16+
http://ce-programming.github.io/toolchain/
17+
18+
19+
Chat:
20+
-----
21+
IRC: #ez80-dev on EFNet
22+
Discord: https://discord.gg/88JPNUE

resources/macOS/dmg/icon.icns

66.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)