Skip to content

Commit

Permalink
Support Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
kkebo committed Sep 8, 2023
1 parent 9fa4a2f commit 0acd78b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 26 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ on:
branches: [ "main" ]

jobs:
build:
build-linux:
runs-on: ubuntu-latest
container: swiftlang/swift:nightly-main-focal-slim
steps:
- uses: actions/checkout@v3
- run: swift --version
- run: swift build
- run: swift test

build-macos:
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- name: Select Xcode
Expand All @@ -24,9 +31,6 @@ jobs:
curl -LO $TOOLCHAIN_URL
installer -target CurrentUserHomeDirectory -pkg $VERSION-osx.pkg
echo "PATH=$HOME/Library/Developer/Toolchains/$VERSION.xctoolchain/usr/bin:${PATH}" >> $GITHUB_ENV
- name: Get Swift version
run: swift --version
- name: Build
run: swift build
- name: Run tests
run: swift test
- run: swift --version
- run: swift build
- run: swift test
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

4 changes: 2 additions & 2 deletions Benchmarks/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"branch" : "swift-DEVELOPMENT-SNAPSHOT-2023-08-29-a",
"revision" : "e99a57389920382f1a8a9b63bda04f4eadc69d49"
"revision" : "7bb5231dad28c6dceabf7a439867f39d2c105e4f",
"version" : "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-09-05-a"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"branch" : "swift-DEVELOPMENT-SNAPSHOT-2023-08-26-a",
"revision" : "1248cf7afd01aacbb8f11b684724793c4f2fd4b2"
"revision" : "7bb5231dad28c6dceabf7a439867f39d2c105e4f",
"version" : "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-09-05-a"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "Tokenizer", targets: ["Tokenizer"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax", revision: "swift-DEVELOPMENT-SNAPSHOT-2023-08-29-a"),
.package(url: "https://github.com/apple/swift-syntax", from: "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-09-05-a"),
],
targets: [
.target(
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

This is a web browser engine written in Swift, and is partially inspired by Servo's [html5ever](https://github.com/servo/html5ever). **This project is in a very early stage.**

## Building

### Linux
## Prerequisites

TODO ([The main blocker is the lack of macros support in Linux.](https://forums.swift.org/t/65427))
- Linux
- Swift nightly toolchain (available from [development snapshots](https://www.swift.org/download/) or [nightly Docker images](https://hub.docker.com/r/swiftlang/swift))
- macOS
- Xcode 15 or later
- Swift nightly toolchain (available from [development snapshots](https://www.swift.org/download/))

### macOS

You need:

- Xcode 15 or later
- Swift nightly toolchain

And then, run the following command to build the source code.
## Building

```shell
swift build
Expand Down

0 comments on commit 0acd78b

Please sign in to comment.