Skip to content

Commit

Permalink
add self hosted arm64 mac
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireHENRY committed Dec 14, 2023
1 parent 1bfaab6 commit 9b8c0d9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ on:
- '**'

jobs:
release-ubuntu:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, gregoireh-1_macos-arm64-M1]

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
if: ${{ matrix.os }} != 'gregoireh-1_macos-arm64-M1'

- name: Cache Rust dependencies
uses: actions/cache@v3
Expand All @@ -23,6 +25,7 @@ jobs:
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-
if: ${{ matrix.os }} != 'gregoireh-1_macos-arm64-M1'

- name: Get SDL2
run: |
Expand All @@ -34,15 +37,18 @@ jobs:
cp include/windows/* .
fi
shell: bash
if: ${{ matrix.os }} != 'gregoireh-1_macos-arm64-M1'

- name: Set environment
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
if [ "${{ matrix.os }}" == "windows-latest" ]; then
PLATFORM=windows
elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
PLATFORM=ubuntu
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
PLATFORM=macos-x86_64
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
PLATFORM=windows
elif [ "${{ matrix.os }}" == "gregoireh-1_macos-arm64-M1" ]; then
PLATFORM=macos-arm64
fi
if [ "${{ matrix.os }}" == "windows-latest" ]; then
Expand All @@ -56,12 +62,6 @@ jobs:
BUNDLE_NAME=kalast-$GITHUB_REF_NAME-$PLATFORM
RELEASE_FILE=$BUNDLE_NAME$OUT_EXT
echo $PLATFORM
echo $EXT
echo $OUT_EXT
echo $BUNDLE_NAME
echo $RELEASE_FILE
echo "PLATFORM=$PLATFORM" >> "$GITHUB_ENV"
echo "EXT=$EXT" >> "$GITHUB_ENV"
echo "OUT_EXT=$OUT_EXT" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -98,9 +98,12 @@ jobs:
cd ..
mv bundle $BUNDLE_NAME
echo "$RELEASE_FILE"
echo "${{ env.RELEASE_FILE }}"
if [ "${{ matrix.os }}" == "windows-latest" ]; then
iscc compile/installer.iss /DVERSION=${{ github.ref_name }} /DSETUP_NAME=$RELEASE_FILE /DBUNDLE_PATH=.\bundle /DASSETS_PATH=.\assets
iscc compile/installer.iss /DVERSION=${{ github.ref_name }} /DSETUP_NAME="$RELEASE_FILE" /DBUNDLE_PATH=.\bundle /DASSETS_PATH=.\assets
else
tar cvzf $RELEASE_FILE $BUNDLE_NAME
fi
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kalast"
version = "0.4.0-beta17"
version = "0.4.0-beta18"
authors = ["Grégoire Henry <gregoire.henry@oma.be>"]
edition = "2021"
description = "Thermophysical Model for Binary Asteroids"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9b8c0d9

Please sign in to comment.