Skip to content

Commit

Permalink
fix glibc runners OWASP/wrongsecrets#615
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Feb 26, 2024
1 parent 73d261d commit 492fb13
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/compile_swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,19 @@ jobs:
name: executable-swift-MacOS
path: swift/.build/apple/Products/Release/wrongsecrets-swift
build-glibclinux:
name: MacOS(Intel&ARM)
runs-on: macos-latest
name: Linux(Intel&ARM)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.9"
- name: Get swift version
run: swift --version # Swift 5.9.x
- name: Compile Swift for glibc linux
run: |
echo "compiling for Linux"
mkdir target
(cd swift && docker run -v "$PWD:/sources" -w /sources --platform linux/arm64 swift:latest swift run -c release --static-swift-stdlib)
(cd swift && cp .build/aarch64-unknown-linux-gnu/release/wrongsecrets-swift ../target/wrongsecrets-swift-linux-arm)
(cd swift && docker run -v "$PWD:/sources" -w /sources --platform linux/amd64 swift:latest swift run -c release)
(cd swift && cp .build/x86_64-unknown-linux-gnu/release/wrongsecrets-swift ../target/wrongsecrets-swift-linux --static-swift-stdlib)
cd swift
docker run -v "$PWD:/sources" -w /sources --platform linux/arm64 swift:latest swift run -c release --static-swift-stdlib
cp .build/aarch64-unknown-linux-gnu/release/wrongsecrets-swift ../target/wrongsecrets-swift-linux-arm
docker run -v "$PWD:/sources" -w /sources --platform linux/amd64 swift:latest swift run -c release
cp .build/x86_64-unknown-linux-gnu/release/wrongsecrets-swift ../target/wrongsecrets-swift-linux --static-swift-stdlib
- name: Uploading Swift executables
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 492fb13

Please sign in to comment.