Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start building & packaging for ARM for mac osx #9

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 45 additions & 14 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
wix build sprig.wxs -ext WiXToolset.Util.wixext -ext WiXToolset.UI.wixext -defaultcompressionlevel high -arch "x64" -bindpath "../../"
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.msi
name: sprig_win_amd64.msi
path: installer-scripts/win/sprig.msi
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.wixpdb
name: sprig_win_amd64.wixpdb
path: installer-scripts/win/sprig.wixpdb
- uses: actions/upload-artifact@v3
with:
Expand All @@ -42,9 +42,9 @@ jobs:
!target/release/deps
!target/release/examples
!target/release/incremental
package-osx:
package-osx-intel:
name: Package Mac OS X systems
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install Rust
Expand All @@ -54,18 +54,49 @@ jobs:
- name: Build Packages
run: |
cd installer-scripts/osx/
./package.sh
./package.sh intel
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.dist
path: installer-scripts/osx/sprig.dist
name: sprig_osx_intel.dist
path: installer-scripts/osx/working-dir-pkg/sprig.dist
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.pkg
path: installer-scripts/osx/sprig.pkg
name: sprig_osx_intel.pkg
path: installer-scripts/osx/working-dir-pkg/sprig.pkg
- uses: actions/upload-artifact@v3
with:
name: sprig-target-directory-osx
name: sprig-target-directory-osx-intel
path: |
target/release/
!target/release/.fingerprint
!target/release/build
!target/release/deps
!target/release/examples
!target/release/incremental
package-osx-arn:
name: Package Mac OS X systems (ARM)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Build Rust Code
run: cargo build --release --all
- name: Build Packages
run: |
cd installer-scripts/osx/
./package.sh arm
- uses: actions/upload-artifact@v3
with:
name: sprig_osx_arm.dist
path: installer-scripts/osx/working-dir-pkg/sprig.dist
- uses: actions/upload-artifact@v3
with:
name: sprig_osx_arm.pkg
path: installer-scripts/osx/working-dir-pkg/sprig.pkg
- uses: actions/upload-artifact@v3
with:
name: sprig-target-directory-osx-arm
path: |
target/release/
!target/release/.fingerprint
Expand Down Expand Up @@ -96,19 +127,19 @@ jobs:
nfpm package -p archlinux
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.deb
name: sprig_unix_amd64.deb
path: installer-scripts/unix/sprig_0.0.6_amd64.deb
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.rpm
name: sprig_unix_amd64.rpm
path: installer-scripts/unix/sprig-0.0.6-1.x86_64.rpm
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.apk
name: sprig_unix_amd64.apk
path: installer-scripts/unix/sprig_0.0.6_x86_64.apk
- uses: actions/upload-artifact@v3
with:
name: sprig_amd64.pkg.tar.zst
name: sprig_unix_amd64.pkg.tar.zst
path: installer-scripts/unix/sprig-0.0.6-1-x86_64.pkg.tar.zst
- uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Build
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -62,7 +62,7 @@ jobs:
name: Run non doc tests
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -75,7 +75,7 @@ jobs:
name: Run doc tests
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-12]
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Package formats
/installer-scripts/osx/working-dir/
/installer-scripts/osx/working-dir-pkg/
/installer-scripts/win/.wix/
/installer-scripts/win/*.msi
/installer-scripts/win/*.wixpdb
Expand Down
19 changes: 19 additions & 0 deletions installer-scripts/osx/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

set -euo pipefail

ARCH="intel"
if [[ "$1" == "arm" ]]; then
ARCH="arm"
fi
echo "Building Mac Package for: [$ARCH]"

export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
(rm -rf ./working-dir || true)
(rm -rf ./working-dir-pkg || true)

echo "Preparing Directory to Package..."
mkdir working-dir
cd working-dir
cp ../../../target/release/catlog ./
Expand All @@ -21,5 +30,15 @@ cp ../../../pkg/cat-dev/licenses/serial2-tokio-rs-apache.md ./
cp ../../../pkg/cat-dev/licenses/serial2-tokio-rs-bsd.md ./
cp ../../../LICENSE ./
cd ../
echo "Done! Building...."

pkgbuild --root ./working-dir/ --identifier "dev.rem-verse.sprig" --version "0.0.6" --install-location "/usr/local/bin" sprig.pkg

echo "Done! Preparing Distribution Directory..."
mkdir working-dir-pkg
cp "./distribution.${ARCH}.xml" "./working-dir-pkg/distribution.xml"
cp "./sprig.pkg" "./working-dir-pkg/sprig.pkg"
echo "Done! Building!"

cd "./working-dir-pkg"
productbuild --synthesize --package "sprig.pkg" sprig.dist
Loading