Skip to content

Commit

Permalink
Move all Linux build logic into the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmassel committed Dec 5, 2023
1 parent cd41cfc commit a8aaaeb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Ruby
run: apt-get update && apt-get install -y ruby zlib1g-dev
- name: Build and Run
run: LANG=en_US.UTF-8 LC_CTYPE=UTF-8 rake build[release]
run: swift build
- name: Test
run: LANG=en_US.UTF-8 LC_CTYPE=UTF-8 rake test
run: swift test
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Ruby
run: apt-get update && apt-get install -y ruby zlib1g-dev

# Build with dynamically linked stdlib
- name: Build
run: LANG=en_US.UTF-8 LC_CTYPE=UTF-8 rake build[release]
run: swift build -c release
- name: Set tag name
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -c 11-)" >> $GITHUB_ENV
- name: Zip release
uses: montudor/[email protected]
with:
args: zip -j XCLogParser-linux-amd64.zip .build/release/xclogparser
- name: Rename zip
run: "mkdir releases && mv XCLogParser-linux-amd64.zip releases/XCLogParser-linux-amd64-$TAG_NAME.zip"

# Build standalone
- name: Build
run: swift build -c release --static-swift-stdlib
- name: Zip release
uses: montudor/[email protected]
with:
args: zip -j XCLogParser-linux-amd64-standalone.zip .build/release/xclogparser

# Package
- name: Rename Zip Files
run: "mkdir -p releases && mv *.zip releases/"
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
Expand Down

0 comments on commit a8aaaeb

Please sign in to comment.