Skip to content

Commit

Permalink
improved CI + examples build (#3)
Browse files Browse the repository at this point in the history
* changed ci

* linux portability
  • Loading branch information
sliemeobn authored Jun 19, 2024
1 parent d10436c commit 48682cc
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Examples

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

defaults:
run:
working-directory: ./Examples/HummingbirdDemo

jobs:
ci:
name: Build Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build
run: swift build
7 changes: 0 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Build
run: swift build --build-tests

Expand Down
3 changes: 1 addition & 2 deletions Examples/HummingbirdDemo/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ let package = Package(
dependencies: [
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "Elementary", package: "Elementary"),
],
path: "Sources"
]
),
]
)
2 changes: 1 addition & 1 deletion Examples/HummingbirdDemo/Sources/App/BrowserSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
#if DEBUG
func browserSyncReload() {
let p = Process()
p.executableURL = URL(filePath: "/bin/sh")
p.executableURL = URL(string: "file:///bin/sh")
p.arguments = ["-c", "browser-sync reload"]
do {
try p.run()
Expand Down

0 comments on commit 48682cc

Please sign in to comment.