Git Product home page Git Product logo

swift-windows-action's Introduction

WARNING: this action is deprecated, please use gha-setup-swift instead.

swift-windows-action

GitHub Action for building your code with Swift on Windows

Inputs

shell-action

Optional The shell command to run on your project. Default is swift test.

swift-version

Optional The version of Swift to install. Default is "5.4.2". Warning You should always quote this argument, since YAML is not type-safe. This argument expects a string, and a simple 5.4 without double or single quotes around the value will be interpreted as a floating point value, which may lead to unexpected results and bugs.

Example usage

name: Build and test with Swift on Windows

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  swift_for_windows:
    runs-on: windows-2019

    steps:
      - uses: actions/checkout@v2
      - uses: MaxDesiatov/swift-windows-action@v1

To build your project without testing, pass an explicit shell-action input with value swift build:

jobs:
  swift_for_windows:
    runs-on: windows-2019

    steps:
      - uses: actions/checkout@v2
      - uses: MaxDesiatov/swift-windows-action@v1
        with:
          shell-action: swift build

swift-windows-action's People

Contributors

maxdesiatov avatar

Stargazers

43trh avatar Alejandro Martínez avatar Tim Kersey avatar taylorswift avatar Koichi Yokota avatar Corey avatar 冀卓疌 avatar Sergej Jaskiewicz avatar Daniel Marriner avatar Marek Skrzelowski avatar Adam Fowler avatar Christopher Richez avatar Konrad `ktoso` Malawski avatar Cihat Gündüz avatar YR Chen avatar Paul Schmiedmayer avatar James Pamplona avatar Zach avatar Kotaro Suto avatar  avatar Mathias Quintero avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

marcprux

swift-windows-action's Issues

Invoking `swift-test.exe` fails using the 5.6.1 toolchain

Overview

I am consistently getting the following error when using the 5.6.1 toolchain:

error: unable to invoke subcommand: C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift-test.exe ()

Output

Additional Context

The runs above use async tests, so the jobs ultimately fail. The first does actually get to run the swift test command though, so that's what I mean by "successful" 🙃. I'm just learning about the lack of async test support on Windows but wanted to test it on the latest toolchain before I dig deeper (although it sounds like nothing has changed).

Problem running tests with Swift 5.5.2

I've been using this action with Swift 5.5.1 for the ParseSwift repo and have ran into very little issues. Every once in awhile 1/10 times it doesn't build the project and I need to rerun my CI; not a big deal.

For Swift 5.5.2, this issue is consistent as I can't run the tests at all. In addition, the Swift 5.5.2 takes a lot longer to build. I do have more async/await files in 5.5.2 (I ignore these in 5.5.1), but the difference in time is on 5.5.1 takes ~ 3 minutes to build and run the whole test suite and in 5.5.2 takes > 5 minutes to build, start the test and fail on the first test. My setup in actions is below:

windows:
    runs-on: windows-2019
    steps:
      - uses: actions/checkout@v2
      - uses: MaxDesiatov/swift-windows-action@v1
        with:
          swift-version: "5.5.2"
          shell-action: swift test --enable-test-discovery -v
      #    shell-action: swift test --enable-test-discovery --enable-code-coverage -v
      #- name: Upload coverage to Codecov
      #  uses: codecov/codecov-action@v2
      #  with:
      #    env_vars: WINDOWS
      #    fail_ci_if_error: false

Failed action in 5.5.2 with the above action setup: https://github.com/parse-community/Parse-Swift/runs/4843124003?check_suite_focus=true#step:3:7963

Successful action in 5.5.1: https://github.com/parse-community/Parse-Swift/runs/4842818376?check_suite_focus=true#step:3:7391

On both versions, the CI is build/test/passing in Linux using the swifty-linux-action which is why I believe it should build/pass in Windows. You can see the PR where I was testing this here: parse-community/Parse-Swift#320

unable to invoke subcommand `swift-build`

i’m running into build failures for swift-json on some windows + swift combinations besides the (Windows 2019, swift 5.4.2) example. (logs). are these combinations supported?

 compnerd.org Swift version 5.3.3-dev (LLVM 3093af41dd, Swift 266905108e)
Target: x86_64-unknown-windows-msvc
error: unable to invoke subcommand: C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swift-build ()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.