Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
feat: add musl ci (#51)
Browse files Browse the repository at this point in the history
This pr adds musl ci support for #50
  • Loading branch information
kjuulh authored Mar 19, 2023
1 parent 2faabb0 commit b094ae4
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 249 deletions.
91 changes: 60 additions & 31 deletions .github/workflows/ci-multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- stable
- beta
- nightly
#- nightly-musl
- nightly-musl
#- nightly-32
#- nightly-mips
#- nightly-arm
Expand All @@ -47,10 +47,10 @@ jobs:
- build: nightly
os: ubuntu-22.04
rust: nightly
#- build: nightly-musl
# os: ubuntu-22.04
# rust: nightly
# target: x86_64-unknown-linux-musl
- build: nightly-musl
os: ubuntu-22.04
rust: nightly
target: x86_64-unknown-linux-musl
#- build: nightly-32
# os: ubuntu-22.04
# rust: nightly
Expand Down Expand Up @@ -87,35 +87,64 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
- uses: actions-rs/toolchain@v1
if: matrix.target == ''
with:
toolchain: ${{ matrix.rust }}
- uses: actions-rs/toolchain@v1
if: matrix.target != ''
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
use-cross: true
- uses: actions-rs/cargo@v1
- name: Use Cross
if: matrix.target != ''
with:
use-cross: true
command: build
args: --workspace --verbose --target ${{ matrix.target }}
- uses: actions-rs/cargo@v1
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
- name: Build
run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }}
- name: Run tests (without cross)
if: matrix.target == ''
run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
#- name: Run tests (with cross)
# if: matrix.target != ''
# run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
test_multi_platform:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
#- windows-latest
steps:
- uses: actions/checkout@v3
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
run: |
ci/scripts/macos-install-packages
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
command: build
args: --workspace --verbose
- uses: actions-rs/cargo@v1
if: matrix.target != ''
with:
use-cross: true
command: test
args: --all --verbose --target ${{ matrix.target }}
- uses: actions-rs/cargo@v1
if: matrix.target == ''
toolchain: nightly
- name: Run unit tests
run: cargo test --locked --all-targets --workspace --all-features
timeout-minutes: 10
rustfmt:
name: rustfmt
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
command: test
args: --all --verbose
toolchain: stable
components: rustfmt
- name: Check formatting
run: cargo fmt --all --check
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Architecture

- `.` Root project mainly used for generating the CLI, which in turn is used to
bootstrap the code generation from `dagger`
- `crates/dagger-bootstrap` Root project mainly used for generating the CLI,
which in turn is used to bootstrap the code generation from `dagger`
- `crates/dagger-core` Contains all base types used during actual usage. This is
where the primary logic lives in which the user interacts (\*disclaimer: most
stuff haven't moved in here yet.)
Expand Down
Loading

0 comments on commit b094ae4

Please sign in to comment.