Skip to content

Commit

Permalink
use cross ci for both musl and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed May 16, 2024
1 parent 77957b3 commit 182cde1
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 47 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Cross-CI

on:
push:
paths-ignore:
- 'ansible/**'
- 'doc/**'
- 'demo/**'
- 'scripts/**'
- 'g3proxy/doc/**'
- 'g3tiles/doc/**'
branches:
- 'master'
- 'rel/**'
pull_request:
branches:
- 'master'
- 'rel/**'

env:
CARGO_TERM_COLOR: always
MUSL_TARGET: x86_64-unknown-linux-musl
CROSS_FEATURES: --no-default-features --features vendored-openssl,quic,vendored-c-ares,hickory

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install capnproto
- name: Install musl dependencies
run: sudo apt-get install musl-tools
if: matrix.target == x86_64-unknown-linux-musl
- name: Install windows dependencies
run: sudo apt-get install gcc-mingw-w64-x86-64
if: matrix.target == x86_64-pc-windows-gnu
- name: Cargo build
run: cargo build --target=${{ matrix.target }} $CROSS_FEATURES
- name: Cargo clippy
run: cargo clippy --target=${{ matrix.target }} $CROSS_FEATURES --tests -- --deny warnings
- name: Cargo test
run: cargo test --target=${{ matrix.target }} $CROSS_FEATURES
47 changes: 0 additions & 47 deletions .github/workflows/linux-musl.yml

This file was deleted.

0 comments on commit 182cde1

Please sign in to comment.