|
@@ -374,6 +374,87 @@ jobs:
|
|
|
run: |
|
|
|
cargo test --workspace --tests
|
|
|
|
|
|
+ # Releases for the CLI on a per-branch basis
|
|
|
+ nightly-cli:
|
|
|
+ permissions:
|
|
|
+ contents: write
|
|
|
+ runs-on: ${{ matrix.platform.os }}
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ platform:
|
|
|
+ - target: x86_64-pc-windows-msvc
|
|
|
+ os: windows-latest
|
|
|
+ - target: aarch64-pc-windows-msvc
|
|
|
+ os: windows-latest
|
|
|
+ - target: x86_64-apple-darwin
|
|
|
+ os: macos-13
|
|
|
+ - target: aarch64-apple-darwin
|
|
|
+ os: macos-latest
|
|
|
+ - target: x86_64-unknown-linux-gnu
|
|
|
+ os: ubuntu-24.04
|
|
|
+ - target: aarch64-unknown-linux-gnu
|
|
|
+ os: ubuntu-24.04-arm
|
|
|
+ - target: x86_64-unknown-linux-musl
|
|
|
+ os: ubuntu-24.04
|
|
|
+ - target: aarch64-unknown-linux-musl
|
|
|
+ os: ubuntu-24.04-arm
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v4
|
|
|
+
|
|
|
+ - name: Install openssl on macos
|
|
|
+ if: matrix.platform.os == 'macos-latest'
|
|
|
+ run: brew install openssl
|
|
|
+
|
|
|
+ - name: Install nasm for windows (tls)
|
|
|
+ if: ${{ matrix.platform.target == 'x86_64-pc-windows-msvc' }}
|
|
|
+ uses: ilammy/setup-nasm@v1
|
|
|
+
|
|
|
+ - name: Free Disk Space
|
|
|
+ if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }}
|
|
|
+ uses: ./.github/actions/free-disk-space
|
|
|
+
|
|
|
+ - uses: awalsh128/cache-apt-pkgs-action@latest
|
|
|
+ if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }}
|
|
|
+ with:
|
|
|
+ packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev musl-tools
|
|
|
+ version: 1.0
|
|
|
+
|
|
|
+ - name: Install stable
|
|
|
+ uses: dtolnay/rust-toolchain@master
|
|
|
+ with:
|
|
|
+ toolchain: "1.86.0"
|
|
|
+ targets: ${{ matrix.platform.target }}
|
|
|
+
|
|
|
+ - uses: Swatinem/rust-cache@v2
|
|
|
+ with:
|
|
|
+ cache-all-crates: "true"
|
|
|
+ save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
+
|
|
|
+ - name: Free Disk Space
|
|
|
+ uses: jlumbroso/free-disk-space@v1.3.1
|
|
|
+ with: # speed things up a bit
|
|
|
+ large-packages: false
|
|
|
+ docker-images: false
|
|
|
+ swap-storage: false
|
|
|
+
|
|
|
+ # Todo: we want `cargo install dx` to actually just use a prebuilt binary instead of building it
|
|
|
+ - name: Build CLI
|
|
|
+ run: |
|
|
|
+ cargo build --release --package dioxus-cli --target ${{ matrix.platform.target }}
|
|
|
+
|
|
|
+ - name: Upload CLI binaries
|
|
|
+ - uses: actions/upload-artifact@v4
|
|
|
+ if: always()
|
|
|
+ with:
|
|
|
+ name: dx-${{ matrix.platform.target }}-${{ github.event.number || "nightly" }}
|
|
|
+ path: ./target/${{ matrix.platform.target }}/release/dx
|
|
|
+ retention-days: ${{ github.ref == 'refs/heads/main' && 90 || 30 }}
|
|
|
+ overwrite: true
|
|
|
+
|
|
|
+ - name: Output artifact ID
|
|
|
+ run: echo 'Artifact ID is ${{ steps.artifact-upload-step.outputs.artifact-id }}'
|
|
|
+
|
|
|
# Only run semver checks if the PR is not a draft and does not have the breaking label
|
|
|
# Breaking PRs don't need to follow semver since they are breaking changes
|
|
|
# However, this means we won't attempt to backport them, so you should be careful about using this label, as it will
|