Skip to content

Commit

Permalink
Fix MacOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed May 6, 2024
1 parent 7863690 commit a006e28
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
sudo apt-get install -y libdbus-1-dev
- name: Get OpenSSL if MacOS
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-13' }}
run: |
brew install openssl@3
Expand All @@ -72,31 +72,31 @@ jobs:
args: --release

- uses: actions-rs/toolchain@v1
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
with:
toolchain: nightly
target: aarch64-apple-darwin

- name: Double check
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-13' }}
run: |
rustup target add aarch64-apple-darwin
rustup show
- name: Cargo build for aarch64 Mac
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target aarch64-apple-darwin

- name: Make M1 Universal binary
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
run: lipo -create -output qpm-universal target/release/${{matrix.file-name}} target/aarch64-apple-darwin/release/${{matrix.file-name}}

- name: Artifact Upload
uses: actions/upload-artifact@v2
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
with:
name: qpm-universal
path: qpm-universal
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cargo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-13]
include:
- os: ubuntu-latest
file-name: qpm
prefix: linux-x64
arch: x64

- os: macOS-latest
- os: macOS-13
file-name: qpm
prefix: macos-x64
arch: x64
Expand Down Expand Up @@ -73,32 +73,32 @@ jobs:
# MacOS Universal binaries
- uses: actions-rs/toolchain@v1
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
with:
toolchain: nightly
target: aarch64-apple-darwin

- name: Double check
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-13' }}
run: |
rustup target add aarch64-apple-darwin
rustup show
- name: Cargo build for aarch64 Mac
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target aarch64-apple-darwin

- name: Make M1 Universal binary
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
run: |
lipo -create -output qpm target/release/${{matrix.file-name}} target/aarch64-apple-darwin/release/${{matrix.file-name}}
pwsh -Command Compress-Archive qpm -DestinationPath qpm-macos-universal.zip
- name: Artifact Upload
if: ${{matrix.os == 'macos-latest' }}
if: ${{matrix.os == 'macos-13' }}
uses: softprops/action-gh-release@v1
with:
files: qpm-macos-universal.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-13]
include:
- os: ubuntu-latest
file-name: qpm
prefix: linux

- os: macOS-latest
- os: macOS-13
file-name: qpm
prefix: macos

Expand Down
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"request": "launch",
"name": "Debug executable 'qpm_cli'",
"cargo": {
"args": ["build", "--bin=qpm_cli", "--package=qpm_cli"],
"args": ["build", "--bin=qpm", "--package=qpm_cli"],
"filter": {
"name": "qpm_cli",
"name": "qpm",
"kind": "bin"
}
},
"args": [],
"args": ["download", "adb"],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'qpm_cli'",
"cargo": {
"args": ["test", "--no-run", "--bin=qpm_cli", "--package=qpm_cli"],
"args": ["test", "--no-run", "--bin=qpm", "--package=qpm_cli"],
"filter": {
"name": "qpm_cli",
"name": "qpm",
"kind": "bin"
}
},
Expand Down

0 comments on commit a006e28

Please sign in to comment.