use Action inputs
This commit is contained in:
parent
c6494d8b03
commit
147c022f8c
|
@ -1,5 +1,13 @@
|
|||
runs:
|
||||
using: composite
|
||||
inputs:
|
||||
swift-dir:
|
||||
description: The directory name part of the distribution URL
|
||||
required: true
|
||||
swift-version:
|
||||
description: Git tag indicating the Swift version
|
||||
required: true
|
||||
|
||||
steps:
|
||||
# https://www.swift.org/install/linux/#installation-via-tarball
|
||||
- name: Install dependent packages for Swift
|
||||
|
@ -27,10 +35,10 @@ runs:
|
|||
|
||||
- name: Download Swift
|
||||
shell: bash
|
||||
run: curl -fLO https://download.swift.org/${{ env.SWIFT_DIR }}/${{ env.SWIFT_VERSION }}/${{ env.SWIFT_VERSION }}-ubuntu22.04.tar.gz
|
||||
run: curl -fLO https://download.swift.org/${{ inputs.swift-dir }}/${{ inputs.swift-version }}/${{ inputs.swift-version }}-ubuntu22.04.tar.gz
|
||||
working-directory: ${{ env.RUNNER_TEMP }}
|
||||
|
||||
- name: Unarchive and Install Swift
|
||||
shell: bash
|
||||
run: sudo tar -xf ${{ env.SWIFT_VERSION }}-ubuntu22.04.tar.gz --strip-components=2 -C /usr/local
|
||||
run: sudo tar -xf ${{ inputs.swift-version }}-ubuntu22.04.tar.gz --strip-components=2 -C /usr/local
|
||||
working-directory: ${{ env.RUNNER_TEMP }}
|
||||
|
|
|
@ -45,9 +45,6 @@ jobs:
|
|||
name: Build and test on Linux with Swift ${{ matrix.swift.version }}
|
||||
timeout-minutes: 40
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
SWIFT_DIR: ${{ matrix.swift.dir }}
|
||||
SWIFT_VERSION: ${{ matrix.swift.version }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
@ -59,6 +56,9 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/install-swift
|
||||
with:
|
||||
swift-dir: ${{ matrix.swift.dir }}
|
||||
swift-version: ${{ matrix.swift.version }}
|
||||
|
||||
- name: Install dependent packages for Wasm
|
||||
run: >
|
||||
|
|
Loading…
Reference in New Issue