mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
Fix installation for Mac OS
Using a more appropriate installation location, /usr/local/bin /usr/bin is protected in Mac OS by SIP (System Integrity Protection)
This commit is contained in:
parent
fee510c32d
commit
df4f24469c
57
.github/workflows/build.yml
vendored
57
.github/workflows/build.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
|
||||||
name: build-and-test
|
name: build-and-test
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
aarch64-glibc:
|
aarch64-glibc:
|
||||||
name: Ubuntu 18.04 (for ARMv8 - glibc)
|
name: Ubuntu 18.04 (for ARMv8 - glibc)
|
||||||
@ -42,6 +42,7 @@ jobs:
|
|||||||
name: 'ouch-aarch64-linux-gnu'
|
name: 'ouch-aarch64-linux-gnu'
|
||||||
path: target/aarch64-unknown-linux-gnu/release/ouch
|
path: target/aarch64-unknown-linux-gnu/release/ouch
|
||||||
|
|
||||||
|
|
||||||
armv7-glibc:
|
armv7-glibc:
|
||||||
name: Ubuntu 18.04 (for ARMv7 - glibc)
|
name: Ubuntu 18.04 (for ARMv7 - glibc)
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
@ -80,8 +81,9 @@ jobs:
|
|||||||
name: 'ouch-armv7-linux-gnueabihf'
|
name: 'ouch-armv7-linux-gnueabihf'
|
||||||
path: target/armv7-unknown-linux-gnueabihf/release/ouch
|
path: target/armv7-unknown-linux-gnueabihf/release/ouch
|
||||||
|
|
||||||
|
|
||||||
x86_64_musl:
|
x86_64_musl:
|
||||||
name: Ubuntu 20.04
|
name: Ubuntu 20.04 (musl)
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -102,6 +104,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install musl-tools
|
sudo apt-get install musl-tools
|
||||||
|
|
||||||
- name: Run cargo build
|
- name: Run cargo build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
@ -162,8 +165,9 @@ jobs:
|
|||||||
name: 'ouch-x86_64-linux-gnu'
|
name: 'ouch-x86_64-linux-gnu'
|
||||||
path: target/release/ouch
|
path: target/release/ouch
|
||||||
|
|
||||||
macos:
|
|
||||||
name: macOS
|
x86_64_macos:
|
||||||
|
name: macOS (x86_64)
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -176,14 +180,15 @@ jobs:
|
|||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: stable
|
||||||
|
target: x86_64-apple-darwin
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Run cargo build
|
- name: Run cargo build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release
|
args: --release --target x86_64-apple-darwin
|
||||||
|
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@ -200,6 +205,45 @@ jobs:
|
|||||||
path: target/release/ouch
|
path: target/release/ouch
|
||||||
|
|
||||||
|
|
||||||
|
aarch64_macos:
|
||||||
|
name: macOS (aarch64)
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Run cargo build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --release --target aarch64-apple-darwin
|
||||||
|
|
||||||
|
- name: Run cargo test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
|
||||||
|
- name: Strip binary
|
||||||
|
run: strip target/release/ouch
|
||||||
|
|
||||||
|
- name: Upload binary
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: 'ouch-aarch64-apple-darwin'
|
||||||
|
path: target/release/ouch
|
||||||
|
|
||||||
|
|
||||||
windows-msvc:
|
windows-msvc:
|
||||||
name: Windows Server (MSVC)
|
name: Windows Server (MSVC)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
@ -217,7 +261,6 @@ jobs:
|
|||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
|
||||||
- name: Run cargo build
|
- name: Run cargo build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
VERSION="0.1.6"
|
VERSION="0.1.6"
|
||||||
|
|
||||||
DOWNLOAD_LOCATION="/tmp/ouch-binary"
|
DOWNLOAD_LOCATION="/tmp/ouch-binary"
|
||||||
INSTALLATION_LOCATION="/usr/bin/ouch"
|
INSTALLATION_LOCATION="/usr/local/bin/ouch"
|
||||||
REPO_URL="https://github.com/ouch-org/ouch"
|
REPO_URL="https://github.com/ouch-org/ouch"
|
||||||
|
|
||||||
# Panics script if anything fails
|
# Panics script if anything fails
|
||||||
|
Loading…
x
Reference in New Issue
Block a user