Skip to content

Commit

Permalink
Merge pull request #7 from opennetltd/misc-improvements
Browse files Browse the repository at this point in the history
Misc improvements
  • Loading branch information
JosephDuffy committed Feb 20, 2024
2 parents 491bb72 + ff9719b commit 0ae75fe
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 1,664 deletions.
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/proposal.md

This file was deleted.

57 changes: 6 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags: "*"

permissions:
contents: write

jobs:
create_release:
name: Create Release
Expand All @@ -15,59 +18,11 @@ jobs:
- name: Fetch tag
run: git fetch --depth=1 origin +${{ github.ref }}:${{ github.ref }}

- name: Get the release version
id: release_version
run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"

- name: Get release description
run: |
description="$(git tag -ln --format=$'%(contents:subject)\n\n%(contents:body)' ${{ steps.release_version.outputs.version }})"
# Fix set-output for multiline strings: https://github.community/t/set-output-truncates-multiline-strings/16852
description="${description//'%'/'%25'}"
description="${description//$'\n'/'%0A'}"
description="${description//$'\r'/'%0D'}"
echo "$description"
echo "::set-output name=description::$description"
id: release_description
$(git tag -ln --format=$'%(contents:subject)\n\n%(contents:body)' ${{ steps.release_version.outputs.version }}) > "RELEASE_BODY.txt"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release_version.outputs.version }}
release_name: ${{ steps.release_version.outputs.version }}
body: ${{ steps.release_description.outputs.description }}
prerelease: ${{ startsWith(steps.release_version.outputs.version, '0.') || contains(steps.release_version.outputs.version, '-') }}

build_docs:
name: Build Docs
runs-on: macos-latest

steps:
- uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1

- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('.ruby-version') }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ hashFiles('.ruby-version') }}-
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build docs
run: bundle exec jazzy

- name: Upload Docs
uses: peaceiris/actions-gh-pages@v3
uses: softprops/action-gh-release@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
body_path: "RELEASE_BODY.txt"
53 changes: 48 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,57 @@
name: Tests

on: [push]
on:
push:
pull_request:
branches:
- "**:**" # PRs from forks have a prefix with `owner:`

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
xcode_tests:
name: Tests
runs-on: macos-latest
name: ${{ matrix.platform }} Tests (Xcode ${{ matrix.xcode }})
runs-on: macos-13
strategy:
fail-fast: false
matrix:
include:
- xcode: "14.2"
destination: "platform=iOS Simulator,name=iPhone 14,OS=16.2"
- xcode: "14.2"
destination: "platform=iOS Simulator,name=iPhone 14,OS=17.0.1"
- xcode: "15.2"
destination: "platform=iOS Simulator,name=iPhone 14,OS=17.2"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app

- name: Install Mint
run: brew install mint

- name: Cache Mint
uses: actions/cache@v3
with:
path: ~/.mint
key: ${{ runner.os }}-mint-xcode_${{ matrix.xcode }}-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-xcode_${{ matrix.xcode }}
- run: mint bootstrap

- name: Cache DerivedData
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-xcode_${{ matrix.xcode }}-derived_data-${{ github.ref }}
restore-keys: |
${{ runner.os }}-xcode_${{ matrix.xcode }}-derived_data-main
${{ runner.os }}-xcode_${{ matrix.xcode }}-derived_data-
- name: Run Tests
run: swift run --configuration release --skip-update --package-path ./CIDependencies/ xcutils test iOS --scheme Composed --enable-code-coverage
run: set -o pipefail && xcodebuild test -scheme Composed-Package -destination '${{ matrix.destination }}' 2>&1 | $(mint which xcbeautify) --renderer github-actions
3 changes: 0 additions & 3 deletions .jazzy.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

34 changes: 0 additions & 34 deletions CIDependencies/Package.resolved

This file was deleted.

15 changes: 0 additions & 15 deletions CIDependencies/Package.swift

This file was deleted.

1 change: 0 additions & 1 deletion CIDependencies/Sources/CIDependencies/Empty.swift

This file was deleted.

3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

109 changes: 0 additions & 109 deletions Gemfile.lock

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions Mintfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cpisciotta/xcbeautify@1.4.0
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// swift-tools-version:5.2
// swift-tools-version: 5.5
import PackageDescription

let package = Package(
name: "Composed",
platforms: [
.iOS(.v11)
.iOS(.v13)
],
products: [
.library(
Expand Down

0 comments on commit 0ae75fe

Please sign in to comment.