Skip to content

Commit

Permalink
Build project with Github Actions and offer Nightly Builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RaafatAkkad committed Jul 9, 2023
1 parent e1bd672 commit f07c789
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 10 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/objective-c-xcode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Xcode - Build, Analyze and Upload

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
build:
name: Build and analyse default scheme using xcodebuild command. The Artifact is uploaded if successful.
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild clean build analyze -configuration Release -scheme "$scheme" -destination "generic/platform=macOS,name=Any Mac" -"$filetype_parameter" "$file_to_build" CODE_SIGN_IDENTITY=”” CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcpretty && exit ${PIPESTATUS[0]}
- name: Create smc.tar.gz
run: |
cd ./build/Release/
tar -czvf smc.tar.gz smc
- name: Upload smc.tar.gz
uses: actions/upload-artifact@v3
with:
name: smc
path: ./build/Release/smc.tar.gz
- name: Create smcFanControl.tar.gz
run: |
cd ./build/Release/
tar -czvf smcFanControl.tar.gz smcFanControl.app
- name: Upload smcFanControl.tar.gz
uses: actions/upload-artifact@v3
with:
name: smcFanControl
path: ./build/Release/smcFanControl.tar.gz
11 changes: 10 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@ $ brew install --cask smcfancontrol
After that you'll be able to use Spotlight to launch smcFanControl normally. :-)


Requirements: Apple Silicon or Intel Mac / OS X 10.7 or higher
Requirements: Intel Mac with macOS 10.7 or higher


Compiled version: https://www.eidac.de/smcfancontrol/smcfancontrol_2_6.zip

FAQ / More info: Found in project under "Ressources/*.lproj/F.A.Q.rtf" or included in above .zip

## Nightly Builds (Supports Apple Silicon & Intel)
[smcFanControl.zip](https://nightly.link/hholtmann/smcFanControl/workflows/objective-c-xcode/master/smcFanControl.zip)

Nightly builds are not signed and require running
```
sudo xattr -cr /Applications/smcFanControl.app
```

---
License: GPL 2
20 changes: 11 additions & 9 deletions smcFanControl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand All @@ -490,7 +490,7 @@
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SDKROOT = macosx;
Expand Down Expand Up @@ -524,7 +524,7 @@
"$(inherited)",
"\"$(SDKROOT)/usr/lib/system\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = com.eidac.smcFanControl2;
Expand Down Expand Up @@ -563,15 +563,15 @@
"$(inherited)",
"\"$(SDKROOT)/usr/lib/system\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
OBJROOT = "$(HOME)/builds";
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OBJROOT = build;
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = com.eidac.smcFanControl2;
PRODUCT_NAME = smcFanControl;
PROVISIONING_PROFILE = "";
SDKROOT = macosx;
SYMROOT = "$(HOME)/builds";
SYMROOT = build;
VALID_ARCHS = "arm64e arm64 i386 x86_64";
WRAPPER_EXTENSION = app;
};
Expand All @@ -580,13 +580,14 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
ENABLE_TESTABILITY = YES;
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
Expand All @@ -598,17 +599,18 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
SDKROOT = macosx;
SYMROOT = "~/builds";
SYMROOT = build;
VALID_ARCHS = "arm64e arm64 i386 x86_64";
};
name = Release;
Expand Down

0 comments on commit f07c789

Please sign in to comment.