feat: expand ~ to home dir in command line args #25
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
name: release | |
on: | |
push: | |
branches: ["mommy", "staging"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
env: | |
RUSTFLAGS: -Zlocation-detail=none -Zthreads=8 -C debuginfo=0 | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
# - os: ubuntu-latest | |
# target: aarch64-unknown-linux-gnu | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
target: ${{ matrix.target }} | |
override: true | |
- name: Install rust-src | |
run: rustup component add rust-src --toolchain=nightly | |
- name: Install Linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt install libasound2-dev | |
- name: Download git submodules | |
run: git submodule update --remote --init --recursive | |
- name: Build Encore | |
run: cargo build --profile release --target ${{ matrix.target }} -Z build-std=std,panic_abort -Z build-std-features=optimize_for_size,panic_immediate_abort | |
- name: Zip Artifact (macOS x86_64) | |
if: matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin' | |
run: zip encore_macos_x86_64.zip target/${{ matrix.target }}/release/encore | |
- name: Zip Artifact (macOS aarch64) | |
if: matrix.os == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' | |
run: zip encore_macos_aarch64.zip target/${{ matrix.target }}/release/encore | |
- name: Zip Artifact (Linux x86_64) | |
if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' | |
run: zip encore_linux_x86_64.zip target/${{ matrix.target }}/release/encore | |
# - name: Zip Artifact (Linux aarch64) | |
# if: matrix.os == 'ubuntu-latest' && matrix.target == 'aarch64-unknown-linux-gnu' | |
# run: zip encore_linux_aarch64.zip target/${{ matrix.target }}/release/encore -r | |
- name: Zip Artifact (Windows x86_64) | |
if: matrix.os == 'windows-latest' && matrix.target == 'x86_64-pc-windows-msvc' | |
run: Compress-Archive -Path target/${{ matrix.target }}/release/encore.exe -DestinationPath encore_windows_x86_64.zip # odd one out | |
- name: Zip Artifact (Windows aarch64) | |
if: matrix.os == 'windows-latest' && matrix.target == 'aarch64-pc-windows-msvc' | |
run: Compress-Archive -Path target/${{ matrix.target }}/release/encore.exe -DestinationPath encore_windows_aarch64.zip | |
- name: Artifact (macOS x86_64) | |
if: matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore (macOS x86_64) | |
path: encore_macos_x86_64.zip | |
- name: Artifact (macOS aarch64) | |
if: matrix.os == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore (macOS aarch64) | |
path: encore_macos_aarch64.zip | |
- name: Artifact (Linux x86_64) | |
if: matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore (Linux x86_64) | |
path: encore_linux_x86_64.zip | |
# - name: Artifact (Linux aarch64) | |
# if: matrix.os == 'ubuntu-latest' && matrix.target == 'aarch64-unknown-linux-gnu' | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: encore (Linux aarch64) | |
# path: encore_linux_aarch64.zip | |
- name: Artifact (Windows x86_64) | |
if: matrix.os == 'windows-latest' && matrix.target == 'x86_64-pc-windows-msvc' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore (Windows x86_64) | |
path: encore_windows_x86_64.zip | |
- name: Artifact (Windows aarch64) | |
if: matrix.os == 'windows-latest' && matrix.target == 'aarch64-pc-windows-msvc' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore (Windows aarch64) | |
path: encore_windows_aarch64.zip |