Skip to content

changed yml actions to buld MUSL versions for Linux #73

changed yml actions to buld MUSL versions for Linux

changed yml actions to buld MUSL versions for Linux #73

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest, macos-13, ubuntu-22.04-arm]
toolchain:
- stable
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Build on ${{ runner.os }}-${{ runner.arch }}
run: |
echo "TRIPLE=$(rustc -vV | sed -n 's|host: ||p')" >> $GITHUB_ENV
echo ${{ env.TRIPLE }}
cargo test --bin dqy
cargo build --release
./scripts/compile_musl.sh
shell: bash
- name: Archive compilation target for ${{ matrix.os }}-${{ matrix.version }}
uses: actions/upload-artifact@v4
with:
name: dqy-${{ env.TRIPLE }}
if-no-files-found: ignore
path: |
target/release/dqy
target/release/dqy.exe
- name: Archive compilation target for Ubuntu musl x64
uses: actions/upload-artifact@v4
with:
name: dqy-x86_64-unknown-linux-musl
if-no-files-found: ignore
path: |
target/x86_64-unknown-linux-musl/release/dqy
- name: Archive compilation target for Ubuntu musl aarch64
uses: actions/upload-artifact@v4
with:
name: dqy-aarch64-unknown-linux-musl
if-no-files-found: ignore
path: |
target/aarch64-unknown-linux-musl/release/dqy
# build_x86_musl:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# - name: Building using Docker
# run: |
# cd docker
# docker build -t dqy --build-arg IMAGE=alpine .
# docker run --name dqy dqy
# docker cp dqy:/dqy/target/release/dqy .
# - name: Create artifact
# uses: actions/upload-artifact@v4
# with:
# name: dqy-x86_64-unknown-linux-musl
# if-no-files-found: ignore
# path: |
# docker/dqy
# build_arm64_musl:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# - name: Install Qemu
# uses: docker/setup-qemu-action@v3
# - name: Building using Docker
# run: |
# cd docker
# docker build -t dqy --platform "linux/arm64" --build-arg IMAGE="arm64v8/alpine" .
# docker run --name dqy dqy
# docker cp dqy:/dqy/target/release/dqy .
# - name: Create artifact
# uses: actions/upload-artifact@v4
# with:
# name: dqy-arm64-unknown-linux-musl
# if-no-files-found: ignore
# path: |
# docker/dqy