-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Move to Swift 5.1 #275
Move to Swift 5.1 #275
Conversation
@f-meloni On Linux in Swift 5.1, URLSession moved to the FoundationNetworking module. |
@bofeizhu I know, this is why I've opened pointfreeco/swift-snapshot-testing#254 and asked on nerdishbynature/RequestKit#64 if I can help :) |
@f-meloni I've made some changes to the Dockerfile in my fork to build the container –and by extension the GitHub Action– with Swift 5.1 (currently on Docker Hub as FROM swift:5.1
MAINTAINER Orta Therox
LABEL "com.github.actions.name"="Danger Swift"
LABEL "com.github.actions.description"="Runs Swift Dangerfiles"
LABEL "com.github.actions.icon"="zap"
LABEL "com.github.actions.color"="blue"
# Install nodejs
RUN apt-get update -q \
&& apt-get install -qy curl \
&& mv /usr/lib/python2.7/site-packages /usr/lib/python2.7/dist-packages; ln -s dist-packages /usr/lib/python2.7/site-package \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -qy nodejs \
&& rm -r /var/lib/apt/lists/*
# Install danger-swift globally
COPY . _danger-swift
RUN cd _danger-swift && make install
# Run Danger Swift via Danger JS, allowing for custom args
ENTRYPOINT ["npx", "--package", "danger", "danger-swift", "ci"] The new Swift containers don't have I've also changed it to copy the source from the repository rather than cloning the repo, although I'm not sure if there's a specific reason for that? If left to copy though, it's a good idea to add a # .dockerignore
.build |
@ellneal I will wait for this to build then I can try the dockerfile directly with github actions and try to fix it. Thank you for having a look :) |
This is now passing CI 🎉🎉🎉 |
I also want to use it in Swift 5.1.3. Currently, Danger/swift is not working in Xcode 11, Swift 5.1.3 because of |
@younatics Did you compile Danger with a different xcode version? |
The dockerfile is working, thank you @ellneal for your suggestions :) Possibly even less given the released version has less dependencies |
That's awesome @f-meloni 😁 Can you tag a new release when you get chance? |
That makes sense. I'll just switch my actions to use the master branch until then 👍 |
It shouldn't take much longer anyway, I think it will be out max at the beginning of next year I think. |
@ellneal You should now be able to use the version 3.0.0, that should also be 30 seconds faster on the build phase. |
Awesome, thanks @f-meloni 🎉 |
Is quite early for moving danger to swift 5.1, but just wanted to start having a look at how it would work and if the problems that Danger had on linux (#214) are still there on 5.1