Revert "Try again before resorting to building std" #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs on push to main, basically the "release" version since we don't really do releases (that's bad right) | |
name: Cargo Build | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "README.md" | |
- "**.json" | |
- "**.yml" | |
- "LICENSE" | |
- "!.github/workflows/cargo-build.yml" | |
- "installer/**" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
include: | |
- os: ubuntu-latest | |
file-name: qpm | |
prefix: linux | |
- os: macOS-latest | |
file-name: qpm | |
prefix: macos | |
- os: windows-latest | |
file-name: qpm.exe | |
prefix: windows | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Get libdbus if Ubuntu | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get install -y libdbus-1-dev | |
- name: Cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --release | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions-rs/toolchain@v1 | |
if: ${{matrix.os == 'macos-latest' }} | |
with: | |
toolchain: nightly | |
target: aarch64-apple-darwin | |
- name: Cargo build for aarch64 Mac | |
if: ${{matrix.os == 'macos-latest' }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --target aarch64-apple-darwin | |
- name: Install Inno Setup | |
if: ${{matrix.os == 'macos-latest' }} | |
run: lipo -create -output qpm-universal target/release/arch target/aarch64-apple-darwin/release/arch | |
- name: Artifact Upload | |
uses: actions/upload-artifact@v2 | |
if: ${{matrix.os == 'macos-latest' }} | |
with: | |
name: qpm-universal | |
path: qpm-universal | |
if-no-files-found: error | |
- name: Download Inno Setup | |
if: ${{matrix.os == 'windows-latest' }} | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: https://jrsoftware.org/download.php/is.exe | |
target: ../ | |
- name: Install Inno Setup | |
if: ${{matrix.os == 'windows-latest' }} | |
run: "../is.exe /VERYSILENT /NORESTART /ALLUSERS" | |
- name: Compile Installer | |
if: ${{matrix.os == 'windows-latest' }} | |
run: '& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /f installer/installer.iss' | |
- name: Artifact Upload | |
uses: actions/upload-artifact@v2 | |
if: ${{matrix.os == 'windows-latest' }} | |
with: | |
name: qpm-installer.exe | |
path: ./installer/qpm-installer.exe | |
if-no-files-found: error | |
- name: Upload executable | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.prefix }}-${{ matrix.file-name }} | |
path: ./target/release/${{ matrix.file-name }} | |
if-no-files-found: error |