Skip to content

Commit

Permalink
Add Linux CI build (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
chojnac authored Sep 2, 2024
1 parent 06be399 commit 1c411c8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "ci-linux"
on:
push:
branches:
- main
paths:
- "Sources/**"
- "Tests/**"
pull_request:
branches:
- '*'
jobs:
build:
name: Linux Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: swift build -c release
- name: Run tests
run: swift test -c release
11 changes: 7 additions & 4 deletions .github/workflows/ci-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ on:
jobs:
build:
name: MacOS Tests
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Tests iOS
run: make test-ios
- name: Upload artifacts
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ test:
swift test

test-swift:
swift test --enable-test-discovery
swift test -c release

test-ios: pre_checks_macos
set -o pipefail && \
xcodebuild test \
-derivedDataPath $(DERIVED_DATA_DIR) \
-scheme NotionSwift \
-destination platform=$(IOS_SIMULATOR) | xcpretty
-destination platform=$(IOS_SIMULATOR)

test-macos: pre_checks_macos
set -o pipefail && \
Expand All @@ -39,10 +39,10 @@ test-linux:
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:5.3 \
bash -c 'make test-swift'
swift:5.9 \
bash -c 'swift test -c release'

test-all: test-macos test-ios

clean:
swift package clean
swift package clean

0 comments on commit 1c411c8

Please sign in to comment.