Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Setup Swift more Swiftly πŸš€ (setup-swift 3.0) #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f1e8dbf
Upgrade some dependencies
fwal Apr 23, 2025
d7fe7b9
Formatting
fwal Apr 23, 2025
a63db63
New set of core functions
fwal Apr 23, 2025
9137113
First stab at a setup that uses Swiftly
fwal Apr 23, 2025
a3be174
Use swiftly for linux and disable mac and windows
fwal Apr 23, 2025
118a8ad
Delete obsolete files
fwal Apr 23, 2025
8af8152
Remove dependabot automerge
fwal Apr 23, 2025
39d38bb
Only run linux tests
fwal Apr 23, 2025
d140809
Pass arguments correctly
fwal Apr 23, 2025
99e5509
Ignore formatting distribution
fwal Apr 23, 2025
7b6c294
Use machine name when downloading
fwal Apr 23, 2025
4a6c27e
Remove rather than comment out
fwal Apr 23, 2025
34bd249
Skip verifying signature for now
fwal Apr 23, 2025
3ca7285
Use better flags when running on CI
fwal Apr 23, 2025
773f80d
Less vebose, skip follow up
fwal Apr 23, 2025
4d64676
Merge branch 'main' into next
fwal Apr 23, 2025
92e5754
Remove unknown flag when installing
fwal Apr 24, 2025
e0d40ca
Try to install prerequisites
fwal Apr 24, 2025
65e6cb0
Do a better version check
fwal Apr 24, 2025
18e7056
Lets use the same format at Swift does
fwal Apr 24, 2025
6c06631
Try out Ubuntu on arm
fwal Apr 24, 2025
89e9feb
Extract version comparision
fwal Apr 24, 2025
07dc236
Have commands check the return code
fwal Apr 24, 2025
c671190
Check if requested version is already installed
fwal Apr 24, 2025
8e63180
Log directories
fwal Apr 24, 2025
5afa18a
Check variables after init
fwal Apr 25, 2025
d6a4580
Try to get location
fwal Apr 25, 2025
7e1f6fd
Add logging
fwal Apr 25, 2025
903b06d
Get location after its set
fwal Apr 25, 2025
064f70c
Add toolchain to path
fwal Apr 25, 2025
327e949
Setup paths before init
fwal Apr 25, 2025
929e7c7
Make a proper tmp path for swiftly
fwal Apr 25, 2025
c503ed1
Avoid modifying profile as it have no effect
fwal Apr 25, 2025
2ab9ed5
Use proper dashes
fwal Apr 25, 2025
c0c7d91
Support post-install script
fwal Apr 27, 2025
20b8085
Correctly name script file
fwal Apr 27, 2025
4d352c6
Move linux setup file
fwal Apr 27, 2025
e55ca62
Try to add initial macOS setup
fwal Apr 27, 2025
014f2aa
Test macos too
fwal Apr 27, 2025
302ceac
Extract temp dir function
fwal Apr 27, 2025
cc93630
Test extracting with a fixed temp path
fwal Apr 27, 2025
75141c4
Set target explicitly
fwal Apr 27, 2025
2dd70f9
Try to resolve location of swiftly
fwal Apr 27, 2025
3396d2c
Initial stab at installing windows
fwal Apr 27, 2025
21bb733
Test windows
fwal Apr 27, 2025
ba6cb3f
Create installer without using swiftly
fwal Apr 27, 2025
f1babb0
Add windows arm test
fwal Apr 27, 2025
c211d8f
Specify installer path
fwal Apr 27, 2025
a4880fb
Try passing passive flag
fwal Apr 27, 2025
e036274
Try to find the path where Swift is normally at
fwal Apr 28, 2025
c0ff911
Try to install to set temp path
fwal Apr 28, 2025
cfdd2a9
List content of bin path
fwal Apr 28, 2025
ad02795
Use standard path and add it
fwal Apr 28, 2025
188bbe5
Dont dir the tmp directory
fwal Apr 28, 2025
cd34367
Dig deeper
fwal Apr 28, 2025
6fcdfe4
Join the dir path ofc
fwal Apr 28, 2025
1efc663
Dig even deeper
fwal Apr 28, 2025
d10500c
Install ide too
fwal Apr 28, 2025
8da4364
Add quiet and no restart flags
fwal Apr 29, 2025
5784929
Move to separate folder
fwal Apr 29, 2025
03c3e15
Try adding msbuild setup as a workflow step
fwal Apr 29, 2025
f96f680
Update indexes
fwal Apr 29, 2025
7d6348b
Rip out everything windows for now
fwal Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: fwal

---

**Describe the bug**
A clear and concise description of what the bug is.

**Workflow configuration (please complete the following information):**
- Action version (`uses`): [e.g. swift-actions/setup-swift@v1]
- Platform (`runs-on`): [e.g. ubuntu-latest]
- Swift version (`swift-version`): [e.g. 5.7]

- Action version (`uses`): [e.g. swift-actions/setup-swift@v1]
- Platform (`runs-on`): [e.g. ubuntu-latest]
- Swift version (`swift-version`): [e.g. 5.7]
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: fwal

---

**Is your feature request related to a problem? Please describe.**
Expand Down
32 changes: 16 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- fwal
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- fwal
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- fwal
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
reviewers:
- fwal
40 changes: 20 additions & 20 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name-template: '$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
name-template: "$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
exclude-labels:
- 'tooling'
- 'documentation'
- "tooling"
- "documentation"
categories:
- title: 'Security'
label: 'security'
- title: 'Breaking changes'
label: 'breaking'
- title: 'Features'
label: 'enhancement'
- title: 'Fixes'
label: 'bug'
- title: 'Dependencies'
label: 'dependencies'
- title: "Security"
label: "security"
- title: "Breaking changes"
label: "breaking"
- title: "Features"
label: "enhancement"
- title: "Fixes"
label: "bug"
- title: "Dependencies"
label: "dependencies"
version-resolver:
major:
labels:
- 'major'
- 'breaking'
- "major"
- "breaking"
minor:
labels:
- 'minor'
- 'enhancement'
- "minor"
- "enhancement"
patch:
labels:
- 'patch'
- 'bug'
- "patch"
- "bug"
default: patch
template: |
$CHANGES
58 changes: 29 additions & 29 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '27 8 * * 6'
- cron: "27 8 * * 6"

jobs:
analyze:
Expand All @@ -32,39 +32,39 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript' ]
language: ["javascript", "typescript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# πŸ“š https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# πŸ“š https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
51 changes: 24 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,41 @@ name: Tests
on:
push:
branches:
- main
- main
pull_request:
branches:
- main
- main

jobs:
unit-test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm install
- run: npm run format-check
- run: npm test
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: yarn
- run: npm run format-check
- run: npm test
integration-test:
name: Integrate Swift ${{ matrix.swift }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
swift: ["6.1.0"]
include:
- os: windows-latest
swift: "5.6.3"
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
swift: ["6.1"]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm install
- run: npm run build && npm run pack-source-map
- uses: ./
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
run: swift --version | grep ${{ matrix.swift }} || exit 1
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm install
- run: npm run build && npm run pack-source-map
- uses: ./
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
run: swift --version | grep ${{ matrix.swift }} || exit 1
24 changes: 0 additions & 24 deletions .github/workflows/dependabot.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Update Release Draft
id: release_draft
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set version
run: npm version ${{ steps.release_draft.outputs.name }} --allow-same-version true --git-tag-version false

Expand All @@ -33,8 +33,7 @@ jobs:
- name: Build
run: npm run all

- name: Commit
- name: Commit
uses: EndBug/add-and-commit@v9
with:
push: origin main --force

26 changes: 13 additions & 13 deletions .github/workflows/stability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Stability

on:
schedule:
- cron: '0 */12 * * *'
- cron: "0 */12 * * *"

jobs:
v1:
Expand All @@ -13,12 +13,12 @@ jobs:
os: [ubuntu-latest, macos-latest]
swift: ["5.10"]
steps:
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
if: always()
run: swift --version | grep ${{ matrix.swift }} || exit 1
- uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
if: always()
run: swift --version | grep ${{ matrix.swift }} || exit 1
main:
name: "main: Swift ${{ matrix.swift }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand All @@ -27,9 +27,9 @@ jobs:
os: [ubuntu-latest, macos-latest]
swift: ["5.10"]
steps:
- uses: swift-actions/setup-swift@main
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
if: always()
run: swift --version | grep ${{ matrix.swift }} || exit 1
- uses: swift-actions/setup-swift@main
with:
swift-version: ${{ matrix.swift }}
- name: Swift version
if: always()
run: swift --version | grep ${{ matrix.swift }} || exit 1
10 changes: 5 additions & 5 deletions .github/workflows/swift-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Detect

on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

jobs:
swift-versions:
name: Swift release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./.github/workflows/check_swift_releases.sh
- uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./.github/workflows/check_swift_releases.sh
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
Loading
Loading