Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/swift/github.com/krzyzanowskim/cr…
Browse files Browse the repository at this point in the history
…yptoswift-1.8.1
  • Loading branch information
btoms20 authored Feb 8, 2024
2 parents d9b7f95 + 079d57c commit e1312be
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build+test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
- name: Build
run: swift build -v
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test Dependency Graph - Dispatch

on:
workflow_dispatch:
inputs:
os:
type: choice
description: OS
options:
- ubuntu-latest
- macos-latest
- windows-latest
swift-version:
type: choice
description: Swift Version
options:
- '5.9'
- '5.8'
- '5.7'
- '5.6'
- '5.5'
- '5.4'
- '5.3'
- '5.2'
- '5.1'
- '5.0'

jobs:
test-dependants:
strategy:
fail-fast: false
matrix:
provider:
- swift-libp2p/swift-cid
runs-on: ${{ github.event.inputs.os }}
steps:
- name: Dump Repo Name
env:
REPO_NAME: ${{ github.event.repository.name }}
run: echo "$REPO_NAME"
- name: Setup swift
uses: swift-actions/setup-swift@v1
with:
swift-version: '${{ github.event.inputs.swift-version }}'
- name: Check out swift-multihash
uses: actions/checkout@v4
with:
path: swift-multihash
- name: Check out provider
uses: actions/checkout@v4
with:
repository: ${{ matrix.provider }}
path: provider
ref: ${{ matrix.ref }}
- name: Use local swift-multihash
run: swift package --package-path ./provider edit swift-multihash --path ./swift-multihash
- name: Run tests
env:
SWIFT_DETERMINISTIC_HASHING: 1
run: swift test --package-path ./provider
38 changes: 38 additions & 0 deletions .github/workflows/providers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test Dependency Graph

on:
pull_request:
types: [labeled]

jobs:
test-dependants:
if: contains(github.event.pull_request.labels.*.name, 'approved')
strategy:
fail-fast: false
matrix:
provider:
- swift-libp2p/swift-cid
os: [ubuntu-latest, macos-latest]
swift-version: ['5.9']
runs-on: ${{ matrix.os }}
steps:
- name: Setup swift
uses: swift-actions/setup-swift@v1
with:
swift-version: '${{ matrix.swift-version }}'
- name: Check out ${{ github.event.repository.name }}
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Check out provider
uses: actions/checkout@v4
with:
repository: ${{ matrix.provider }}
path: provider
ref: ${{ matrix.ref }}
- name: Use local ${{ github.event.repository.name }}
run: swift package --package-path ./provider edit ${{ github.event.repository.name }} --path ./${{ github.event.repository.name }}
- name: Run tests
env:
SWIFT_DETERMINISTIC_HASHING: 1
run: swift test --package-path ./provider
44 changes: 44 additions & 0 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Specific Manual Test

on:
workflow_dispatch:
inputs:
os:
type: choice
description: OS
options:
- ubuntu
- macos
- windows
os-version:
description: OS Version
default: latest
swift-version:
type: choice
description: Swift Version
options:
- '5.9'
- '5.8'
- '5.7'
- '5.6'
- '5.5'
- '5.4'
- '5.3'
- '5.2'
- '5.1'
- '5.0'

jobs:
test-spec:
runs-on: ${{ github.event.inputs.os }}-${{ github.event.inputs.os-version }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
with:
swift-version: '${{ github.event.inputs.swift-version }}'
- name: Get swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Manual Test

on:
workflow_dispatch:

jobs:
test-matrix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
swift: ["5.9", "5.8", "5.7"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- name: Get swift version
run: swift --version
- name: Build
run: swift build -v
- name: Test
run: swift test -v

0 comments on commit e1312be

Please sign in to comment.