Skip to content

Commit 9d2a85d

Browse files
committedSep 28, 2023
lint all Yaml files
1 parent 8be8055 commit 9d2a85d

File tree

5 files changed

+212
-213
lines changed

5 files changed

+212
-213
lines changed
 

‎.github/workflows/clean-artifacts.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: Clean Artifacts
22
on:
33
schedule:
44
# Once a day
5-
- cron: '0 0 * * *'
5+
- cron: "0 0 * * *"
66
workflow_dispatch:
77
jobs:
88
remove-old-artifacts:
99
runs-on: ubuntu-latest
1010
timeout-minutes: 10
1111
steps:
12-
- name: Remove old artifacts
13-
uses: c-hive/gha-remove-artifacts@v1
14-
with:
15-
age: '1 week'
16-
skip-tags: true
17-
skip-recent: 5
12+
- name: Remove old artifacts
13+
uses: c-hive/gha-remove-artifacts@v1
14+
with:
15+
age: "1 week"
16+
skip-tags: true
17+
skip-recent: 5

‎.github/workflows/release-tip.yml

+134-134
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
needs: [build-macos]
1515
steps:
16-
- uses: actions/checkout@v4
17-
- name: Tip Tag
18-
run: |
19-
git config user.name "GitHub Actions Bot"
20-
git config user.email "<>"
21-
git tag -fa tip -m "Latest Continuous Release" ${GITHUB_SHA}
22-
git push --force origin tip
16+
- uses: actions/checkout@v4
17+
- name: Tip Tag
18+
run: |
19+
git config user.name "GitHub Actions Bot"
20+
git config user.email "<>"
21+
git tag -fa tip -m "Latest Continuous Release" ${GITHUB_SHA}
22+
git push --force origin tip
2323
2424
build-macos:
2525
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
@@ -29,130 +29,130 @@ jobs:
2929
# Needed for macos SDK
3030
AGREE: "true"
3131
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v4
34-
with:
35-
submodules: recursive
36-
fetch-depth: 0
37-
38-
# Install Nix and use that to run our tests so our environment matches exactly.
39-
- uses: cachix/install-nix-action@v23
40-
with:
41-
nix_path: nixpkgs=channel:nixos-unstable
42-
43-
# Setup our S3 client
44-
- name: Setup s3cmd
45-
uses: s3-actions/s3cmd@v1.5.0
46-
with:
47-
provider: cloudflare
48-
account_id: ${{ secrets.CF_R2_TIP_ACCOUNT_ID }}
49-
access_key: ${{ secrets.CF_R2_TIP_AWS_KEY }}
50-
secreT_key: ${{ secrets.CF_R2_TIP_SECRET_KEY }}
51-
52-
# Load Build Number
53-
- name: Build Number
54-
run: |
55-
echo "GHOSTTY_BUILD=$(git rev-list --count head)" >> $GITHUB_ENV
56-
57-
# GhosttyKit is the framework that is built from Zig for our native
58-
# Mac app to access. Build this in release mode.
59-
- name: Build GhosttyKit
60-
run: nix develop -c zig build -Dstatic=true -Doptimize=ReleaseFast
61-
62-
# The native app is built with native XCode tooling. This also does
63-
# codesigning. IMPORTANT: this must NOT run in a Nix environment.
64-
# Nix breaks xcodebuild so this has to be run outside.
65-
- name: Build Ghostty.app
66-
run: cd macos && xcodebuild -configuration Release
67-
68-
# We inject the "build number" as simply the number of commits since HEAD.
69-
# This will be a monotonically always increasing build number that we use.
70-
- name: Inject Build Number
71-
run: |
72-
echo "Setting build to $GHOSTTY_BUILD"
73-
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $GHOSTTY_BUILD" "macos/build/Release/Ghostty.app/Contents/Info.plist"
74-
75-
- name: Zip Unsigned App
76-
run: nix develop -c sh -c 'cd macos/build/Release && zip -9 -r --symlinks ../../../ghostty-macos-universal-unsigned.zip Ghostty.app'
77-
78-
# Update Release
79-
- name: Release Unsigned
80-
uses: softprops/action-gh-release@v1
81-
with:
82-
name: "Ghostty Tip (\"Nightly\")"
83-
prerelease: true
84-
tag_name: tip
85-
target_commitish: ${{ github.sha }}
86-
files: ghostty-macos-universal-unsigned.zip
87-
token: ${{ secrets.GH_RELEASE_TOKEN }}
88-
89-
- name: Codesign app bundle
90-
env:
91-
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
92-
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
93-
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
94-
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
95-
run: |
96-
# Turn our base64-encoded certificate back to a regular .p12 file
97-
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
98-
99-
# We need to create a new keychain, otherwise using the certificate will prompt
100-
# with a UI dialog asking for the certificate password, which we can't
101-
# use in a headless CI environment
102-
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
103-
security default-keychain -s build.keychain
104-
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
105-
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
106-
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
107-
108-
# We finally codesign our app bundle, specifying the Hardened runtime option
109-
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime macos/build/Release/Ghostty.app -v
110-
111-
- name: "Notarize app bundle"
112-
env:
113-
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
114-
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
115-
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
116-
run: |
117-
# Store the notarization credentials so that we can prevent a UI password dialog
118-
# from blocking the CI
119-
echo "Create keychain profile"
120-
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
121-
122-
# We can't notarize an app bundle directly, but we need to compress it as an archive.
123-
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
124-
# notarization service
125-
echo "Creating temp notarization archive"
126-
ditto -c -k --keepParent "macos/build/Release/Ghostty.app" "notarization.zip"
127-
128-
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
129-
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
130-
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
131-
# you're curious
132-
echo "Notarize app"
133-
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
134-
135-
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
136-
# validated by macOS even when an internet connection is not available.
137-
echo "Attach staple"
138-
xcrun stapler staple "macos/build/Release/Ghostty.app"
139-
140-
# Zip up the app
141-
- name: Zip App
142-
run: cd macos/build/Release && zip -9 -r --symlinks ../../../ghostty-macos-universal.zip Ghostty.app
143-
144-
# Update Release
145-
- name: Release
146-
uses: softprops/action-gh-release@v1
147-
with:
148-
name: "Ghostty Tip (\"Nightly\")"
149-
prerelease: true
150-
tag_name: tip
151-
target_commitish: ${{ github.sha }}
152-
files: ghostty-macos-universal.zip
153-
token: ${{ secrets.GH_RELEASE_TOKEN }}
154-
155-
# Update Blob Storage
156-
- name: Upload to Blob Storage
157-
run: |
158-
s3cmd put ghostty-macos-universal.zip s3://ghostty-tip/${GHOSTTY_BUILD}/ghostty-macos-universal.zip
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
fetch-depth: 0
37+
38+
# Install Nix and use that to run our tests so our environment matches exactly.
39+
- uses: cachix/install-nix-action@v23
40+
with:
41+
nix_path: nixpkgs=channel:nixos-unstable
42+
43+
# Setup our S3 client
44+
- name: Setup s3cmd
45+
uses: s3-actions/s3cmd@v1.5.0
46+
with:
47+
provider: cloudflare
48+
account_id: ${{ secrets.CF_R2_TIP_ACCOUNT_ID }}
49+
access_key: ${{ secrets.CF_R2_TIP_AWS_KEY }}
50+
secreT_key: ${{ secrets.CF_R2_TIP_SECRET_KEY }}
51+
52+
# Load Build Number
53+
- name: Build Number
54+
run: |
55+
echo "GHOSTTY_BUILD=$(git rev-list --count head)" >> $GITHUB_ENV
56+
57+
# GhosttyKit is the framework that is built from Zig for our native
58+
# Mac app to access. Build this in release mode.
59+
- name: Build GhosttyKit
60+
run: nix develop -c zig build -Dstatic=true -Doptimize=ReleaseFast
61+
62+
# The native app is built with native XCode tooling. This also does
63+
# codesigning. IMPORTANT: this must NOT run in a Nix environment.
64+
# Nix breaks xcodebuild so this has to be run outside.
65+
- name: Build Ghostty.app
66+
run: cd macos && xcodebuild -configuration Release
67+
68+
# We inject the "build number" as simply the number of commits since HEAD.
69+
# This will be a monotonically always increasing build number that we use.
70+
- name: Inject Build Number
71+
run: |
72+
echo "Setting build to $GHOSTTY_BUILD"
73+
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $GHOSTTY_BUILD" "macos/build/Release/Ghostty.app/Contents/Info.plist"
74+
75+
- name: Zip Unsigned App
76+
run: nix develop -c sh -c 'cd macos/build/Release && zip -9 -r --symlinks ../../../ghostty-macos-universal-unsigned.zip Ghostty.app'
77+
78+
# Update Release
79+
- name: Release Unsigned
80+
uses: softprops/action-gh-release@v1
81+
with:
82+
name: 'Ghostty Tip ("Nightly")'
83+
prerelease: true
84+
tag_name: tip
85+
target_commitish: ${{ github.sha }}
86+
files: ghostty-macos-universal-unsigned.zip
87+
token: ${{ secrets.GH_RELEASE_TOKEN }}
88+
89+
- name: Codesign app bundle
90+
env:
91+
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
92+
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
93+
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
94+
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
95+
run: |
96+
# Turn our base64-encoded certificate back to a regular .p12 file
97+
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
98+
99+
# We need to create a new keychain, otherwise using the certificate will prompt
100+
# with a UI dialog asking for the certificate password, which we can't
101+
# use in a headless CI environment
102+
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
103+
security default-keychain -s build.keychain
104+
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
105+
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
106+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
107+
108+
# We finally codesign our app bundle, specifying the Hardened runtime option
109+
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime macos/build/Release/Ghostty.app -v
110+
111+
- name: "Notarize app bundle"
112+
env:
113+
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
114+
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
115+
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
116+
run: |
117+
# Store the notarization credentials so that we can prevent a UI password dialog
118+
# from blocking the CI
119+
echo "Create keychain profile"
120+
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
121+
122+
# We can't notarize an app bundle directly, but we need to compress it as an archive.
123+
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
124+
# notarization service
125+
echo "Creating temp notarization archive"
126+
ditto -c -k --keepParent "macos/build/Release/Ghostty.app" "notarization.zip"
127+
128+
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
129+
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
130+
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
131+
# you're curious
132+
echo "Notarize app"
133+
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
134+
135+
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
136+
# validated by macOS even when an internet connection is not available.
137+
echo "Attach staple"
138+
xcrun stapler staple "macos/build/Release/Ghostty.app"
139+
140+
# Zip up the app
141+
- name: Zip App
142+
run: cd macos/build/Release && zip -9 -r --symlinks ../../../ghostty-macos-universal.zip Ghostty.app
143+
144+
# Update Release
145+
- name: Release
146+
uses: softprops/action-gh-release@v1
147+
with:
148+
name: 'Ghostty Tip ("Nightly")'
149+
prerelease: true
150+
tag_name: tip
151+
target_commitish: ${{ github.sha }}
152+
files: ghostty-macos-universal.zip
153+
token: ${{ secrets.GH_RELEASE_TOKEN }}
154+
155+
# Update Blob Storage
156+
- name: Upload to Blob Storage
157+
run: |
158+
s3cmd put ghostty-macos-universal.zip s3://ghostty-tip/${GHOSTTY_BUILD}/ghostty-macos-universal.zip

‎.github/workflows/test.yml

+56-57
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,36 @@ jobs:
88
os: [ubuntu-latest]
99

1010
target: [
11-
aarch64-macos,
12-
x86_64-macos,
11+
aarch64-macos,
12+
x86_64-macos,
1313

14-
aarch64-linux-gnu,
15-
x86_64-linux-gnu,
16-
17-
# No windows support currently.
18-
# i386-windows,
19-
# x86_64-windows-gnu,
20-
]
14+
aarch64-linux-gnu,
15+
x86_64-linux-gnu,
16+
# No windows support currently.
17+
# i386-windows,
18+
# x86_64-windows-gnu,
19+
]
2120
runs-on: ${{ matrix.os }}
2221
needs: test
2322
env:
2423
# Needed for macos SDK
2524
AGREE: "true"
2625
steps:
27-
- name: Checkout code
28-
uses: actions/checkout@v4
29-
with:
30-
submodules: recursive
31-
fetch-depth: 0
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
30+
fetch-depth: 0
3231

33-
# Install Nix and use that to run our tests so our environment matches exactly.
34-
- uses: cachix/install-nix-action@v23
35-
with:
36-
nix_path: nixpkgs=channel:nixos-unstable
32+
# Install Nix and use that to run our tests so our environment matches exactly.
33+
- uses: cachix/install-nix-action@v23
34+
with:
35+
nix_path: nixpkgs=channel:nixos-unstable
3736

38-
# Cross-compile the binary. We always use static building for this
39-
# because its the only way to access the headers.
40-
- name: Test Build
41-
run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }}
37+
# Cross-compile the binary. We always use static building for this
38+
# because its the only way to access the headers.
39+
- name: Test Build
40+
run: nix develop -c zig build -Dstatic=true -Dapp-runtime=glfw -Dtarget=${{ matrix.target }}
4241

4342
build-macos:
4443
runs-on: macos-12
@@ -47,53 +46,53 @@ jobs:
4746
# Needed for macos SDK
4847
AGREE: "true"
4948
steps:
50-
- name: Checkout code
51-
uses: actions/checkout@v4
52-
with:
53-
submodules: recursive
54-
fetch-depth: 0
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
with:
52+
submodules: recursive
53+
fetch-depth: 0
5554

56-
# Install Nix and use that to run our tests so our environment matches exactly.
57-
- uses: cachix/install-nix-action@v23
58-
with:
59-
nix_path: nixpkgs=channel:nixos-unstable
55+
# Install Nix and use that to run our tests so our environment matches exactly.
56+
- uses: cachix/install-nix-action@v23
57+
with:
58+
nix_path: nixpkgs=channel:nixos-unstable
6059

61-
# GhosttyKit is the framework that is built from Zig for our native
62-
# Mac app to access.
63-
- name: Build GhosttyKit
64-
run: nix develop -c zig build -Dstatic=true
60+
# GhosttyKit is the framework that is built from Zig for our native
61+
# Mac app to access.
62+
- name: Build GhosttyKit
63+
run: nix develop -c zig build -Dstatic=true
6564

66-
# The native app is built with native XCode tooling. This also does
67-
# codesigning. IMPORTANT: this must NOT run in a Nix environment.
68-
# Nix breaks xcodebuild so this has to be run outside.
69-
- name: Build Ghostty.app
70-
run: cd macos && xcodebuild
65+
# The native app is built with native XCode tooling. This also does
66+
# codesigning. IMPORTANT: this must NOT run in a Nix environment.
67+
# Nix breaks xcodebuild so this has to be run outside.
68+
- name: Build Ghostty.app
69+
run: cd macos && xcodebuild
7170

7271
test:
7372
strategy:
7473
matrix:
7574
os: [ubuntu-latest]
7675
runs-on: ${{ matrix.os }}
7776
steps:
78-
- name: Checkout code
79-
uses: actions/checkout@v4
80-
with:
81-
submodules: recursive
82-
fetch-depth: 0
77+
- name: Checkout code
78+
uses: actions/checkout@v4
79+
with:
80+
submodules: recursive
81+
fetch-depth: 0
8382

84-
# Install Nix and use that to run our tests so our environment matches exactly.
85-
- uses: cachix/install-nix-action@v23
86-
with:
87-
nix_path: nixpkgs=channel:nixos-unstable
83+
# Install Nix and use that to run our tests so our environment matches exactly.
84+
- uses: cachix/install-nix-action@v23
85+
with:
86+
nix_path: nixpkgs=channel:nixos-unstable
8887

89-
- name: test
90-
run: nix develop -c zig build -Dapp-runtime=none test
88+
- name: test
89+
run: nix develop -c zig build -Dapp-runtime=none test
9190

92-
- name: Test GTK Build
93-
run: nix develop -c zig build -Dapp-runtime=gtk
91+
- name: Test GTK Build
92+
run: nix develop -c zig build -Dapp-runtime=gtk
9493

95-
- name: Test GLFW Build
96-
run: nix develop -c zig build -Dapp-runtime=glfw
94+
- name: Test GLFW Build
95+
run: nix develop -c zig build -Dapp-runtime=glfw
9796

98-
- name: Test Dynamic Build
99-
run: nix develop -c zig build -Dstatic=false
97+
- name: Test Dynamic Build
98+
run: nix develop -c zig build -Dstatic=false

‎com.mitchellh.ghostty.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# we want to keep _trying_ but its something with known issues.
44
app-id: com.mitchellh.ghostty
55
runtime: org.gnome.Platform
6-
runtime-version: '43'
6+
runtime-version: "43"
77
sdk: org.gnome.Sdk
88
default-branch: tip
99
command: ghostty

‎vendor/pixman/.gitlab-ci.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
image: fedora:28
22

33
autotools-build:
4-
script:
5-
- dnf -y install dnf-plugins-core
6-
- dnf -y groupinstall buildsys-build
7-
- dnf -y builddep pixman
8-
- ./autogen.sh
9-
- make -sj4 check
4+
script:
5+
- dnf -y install dnf-plugins-core
6+
- dnf -y groupinstall buildsys-build
7+
- dnf -y builddep pixman
8+
- ./autogen.sh
9+
- make -sj4 check
1010

1111
meson-build:
12-
script:
13-
- dnf -y install dnf-plugins-core
14-
- dnf -y groupinstall buildsys-build
15-
- dnf -y builddep pixman
16-
- dnf -y install ninja-build
17-
- python3 -m pip install meson>=0.52.1
18-
- meson build
19-
- ninja -C build test
12+
script:
13+
- dnf -y install dnf-plugins-core
14+
- dnf -y groupinstall buildsys-build
15+
- dnf -y builddep pixman
16+
- dnf -y install ninja-build
17+
- python3 -m pip install meson>=0.52.1
18+
- meson build
19+
- ninja -C build test

0 commit comments

Comments
 (0)
Please sign in to comment.