Skip to content

Commit

Permalink
Use mise for dev tooling (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Aug 25, 2024
1 parent f634ed7 commit 41e5034
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 44 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,32 @@ on:
- master
pull_request: {}
env:
MISE_EXPERIMENTAL: 1
swift_package_resolve: swift package resolve
swift_build: swift build
swift_test: swift test
periphery_scan: ./.build/debug/periphery scan --quiet --clean-build
cache_version: 1
jobs:
lint:
runs-on: macos-14
name: Lint
steps:
- uses: actions/checkout@master
- uses: jdx/mise-action@v2
- run: mise run lint
macOS:
strategy:
fail-fast: false
matrix:
xcode: ["16.0", "15.4", "15.2"]
xcode: ["16.1", "15.4", "15.2"]
include:
- xcode: "16.0"
macos: macOS-14
- xcode: "16.1"
macos: macos-14
- xcode: "15.4"
macos: macOS-14
macos: macos-14
- xcode: "15.2"
macos: macOS-14
macos: macos-14
runs-on: ${{ matrix.macos }}
name: macOS
steps:
Expand Down
3 changes: 3 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
swiftformat = "0.54.3"
swiftlint = "0.56.2"
8 changes: 8 additions & 0 deletions .mise/tasks/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# mise description="Lint the project"
set -euo pipefail

cd $MISE_PROJECT_ROOT

swiftformat --quiet --strict
swiftlint lint --quiet --strict
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,3 @@ build_release: clean build_x86_64 build_arm64
@mkdir -p .release
@lipo -create -output .release/periphery ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64}
@strip -rSTX .release/periphery

swiftformat:
@./scripts/lint/swiftformat.sh

swiftlint:
@./scripts/lint/swiftlint.sh

lint: swiftlint swiftformat
14 changes: 7 additions & 7 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/ileitch/swift-filename-matcher",
"state" : {
"revision" : "17eaeaf60f2703e3ef826de94149c88a78953fd3",
"version" : "0.1.1"
"revision" : "8cc02e902f651bb5812860011ee13707b9e037df",
"version" : "0.1.2"
}
},
{
"identity" : "swift-indexstore",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ileitch/swift-indexstore",
"location" : "https://github.com/kateinoigakukun/swift-indexstore",
"state" : {
"revision" : "e0046a1704e2e7af88355883247ee1f9d47ed9ee",
"version" : "9.0.4"
"revision" : "9363af98d32247bf953855fc99d1f1f1ef803e43",
"version" : "0.3.0"
}
},
{
Expand All @@ -77,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/tuist/xcodeproj",
"state" : {
"revision" : "c15e011dc0ea74f7833bf33c2791483beb9c7577",
"version" : "8.23.1"
"revision" : "a1ff175a2f3bfbec166f33b264263c55f2149720",
"version" : "8.23.2"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var dependencies: [Package.Dependency] = [
.package(url: "https://github.com/jpsim/Yams", from: "5.0.0"),
.package(url: "https://github.com/tadija/AEXML", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(url: "https://github.com/ileitch/swift-indexstore", from: "9.0.4"),
.package(url: "https://github.com/kateinoigakukun/swift-indexstore", from: "0.3.0"),
.package(url: "https://github.com/apple/swift-syntax", from: "600.0.0-prerelease-2024-08-14"),
.package(url: "https://github.com/ileitch/swift-filename-matcher", from: "0.0.0"),
]
Expand Down
1 change: 0 additions & 1 deletion Sources/Shared/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public struct ContextualLogger {
}
#else
public struct SignpostInterval {
// swiftlint:disable:next unneeded_synthesized_initializer
@usableFromInline
init() {}
}
Expand Down
11 changes: 0 additions & 11 deletions scripts/lint/swiftformat.sh

This file was deleted.

11 changes: 0 additions & 11 deletions scripts/lint/swiftlint.sh

This file was deleted.

0 comments on commit 41e5034

Please sign in to comment.