Skip to content

Commit

Permalink
🥪 lunch tweaks to add arm
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronleopold committed Jul 30, 2024
1 parent 05b78b8 commit 4e16786
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 73 deletions.
64 changes: 1 addition & 63 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Release CI'
name: Release CI

# This workflow triggers when a PR is merged into `main`, but jobs have conditions to only run when:
# - A PR is closed, merged into `main`, from a branch that matches the pattern `release/v*.*.*`
Expand Down Expand Up @@ -86,65 +86,3 @@ jobs:
push: ${{ needs.push-or-load.outputs.push }}
platforms: ${{ needs.push-or-load.outputs.platforms }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}

# build-web-app:
# name: Build web app
# runs-on: [self-hosted]
# if: false # TODO: Enable this once 0.1.0 is ready
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Build the app
# uses: ./.github/actions/build-web

# - name: Upload the build
# uses: ./.github/actions/upload-artifact
# with:
# upload-name: webapp
# upload-path: apps/web/dist

# build-server:
# strategy:
# fail-fast: true
# matrix:
# platform: [macos, windows]
# name: Build server app
# needs: build-web
# runs-on: ${{ matrix.platform }}
# if: false # TODO: Enable this once 0.1.0 is ready
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Build the server
# uses: ./.github/actions/build-server
# with:
# platform: ${{ matrix.platform }}

# - name: Upload the server binary
# uses: ./.github/actions/upload-artifact
# with:
# upload-name: stump_server-${{ matrix.platform }}
# upload-path: target/release/stump_server

# # TODO: Investigate if I can just merge this with the above
# build-linux-server:
# name: Build server app (self-hosted runner)
# needs: build-web
# runs-on: [self-hosted]
# if: false # TODO: Enable this once 0.1.0 is ready
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Build the server
# uses: ./.github/actions/build-server
# with:
# platform: 'linux'

# - name: Upload the server binary
# uses: ./.github/actions/upload-artifact
# with:
# upload-name: stump_server-linux
# upload-path: target/release/stump_server
35 changes: 25 additions & 10 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ jobs:
needs: build-webapp
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Note: macos-13 is intel-based, macos-latest is M1-based
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
include:
- os: ubuntu-latest
artifact_name: linux-artifact
artifact_filename: stump_server
- os: macos-13
artifact_name: macos-intel-artifact
artifact_filename: stump_server
- os: macos-latest
artifact_name: macos-artifact
artifact_name: macos-arm-artifact
artifact_filename: stump_server
- os: windows-latest
artifact_name: windows-artifact
Expand All @@ -57,6 +62,7 @@ jobs:
with:
upload-name: ${{ matrix.artifact_name }}
upload-path: staging

# This job creates the release and organizes associated files
create-release:
needs: build-binary
Expand All @@ -74,11 +80,17 @@ jobs:
name: linux-artifact
path: StumpServer-linux

- name: Download artifact (macOS)
- name: Download artifact (macOS Intel)
uses: actions/download-artifact@v4
with:
name: macos-intel-artifact
path: StumpServer-macos-intel

- name: Download artifact (macOS ARM)
uses: actions/download-artifact@v4
with:
name: macos-artifact
path: StumpServer-macos
name: macos-arm-artifact
path: StumpServer-macos-arm

- name: Download artifact (Windows)
uses: actions/download-artifact@v4
Expand All @@ -93,8 +105,10 @@ jobs:
run: |
cd StumpServer-linux
zip -r ../linux-build-results.zip *
cd ../StumpServer-macos
zip -r ../macos-build-results.zip *
cd ../StumpServer-macos-intel
zip -r ../macos-intel-build-results.zip *
cd ../StumpServer-macos-arm
zip -r ../macos-arm-build-results.zip *
cd ../StumpServer-windows
zip -r ../windows-build-results.zip *
cd ..
Expand All @@ -106,6 +120,7 @@ jobs:
--target main \
--title 'v${{ github.event.inputs.version }}' \
--generate-notes \
linux-build-results.zip#StumpServer-${{ github.event.inputs.version }}-x64-Linux.zip \
macos-build-results.zip#StumpServer-${{ github.event.inputs.version }}-x64-macOS.zip \
windows-build-results.zip#StumpServer-${{ github.event.inputs.version }}-x64-Windows.zip
linux-build-results.zip#StumpServer-${{ github.event.inputs.version }}-linux-x86_64.zip \
macos-intel-build-results.zip#StumpServer-${{ github.event.inputs.version }}-macos-intel.zip \
macos-arm-build-results.zip#StumpServer-${{ github.event.inputs.version }}-macos-arm.zip \
windows-build-results.zip#StumpServer-${{ github.event.inputs.version }}-windows-x86_64.zip

0 comments on commit 4e16786

Please sign in to comment.