mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
Fix mobile CI + Some small CI improvements (#2113)
Fix mobile CI - Use rust envvars in all workflows - Use rust envvars and mold when build sd-server docker
This commit is contained in:
parent
b638fc2177
commit
3bdcc05c2d
2
.github/actions/setup-system/action.yml
vendored
2
.github/actions/setup-system/action.yml
vendored
|
@ -46,7 +46,7 @@ runs:
|
|||
if: ${{ runner.os != 'Linux' }}
|
||||
uses: ilammy/setup-nasm@v1
|
||||
|
||||
- name: Install Mold
|
||||
- name: Install Mold (linker)
|
||||
shell: bash
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
|
|
6
.github/workflows/cache-factory.yaml
vendored
6
.github/workflows/cache-factory.yaml
vendored
|
@ -64,6 +64,9 @@ jobs:
|
|||
remove-haskell: 'true'
|
||||
remove-docker-images: 'true'
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Symlink target to C:\
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: powershell
|
||||
|
@ -71,9 +74,6 @@ jobs:
|
|||
New-Item -ItemType Directory -Force -Path C:\spacedrive_target
|
||||
New-Item -Path target -ItemType Junction -Value C:\spacedrive_target
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup System and Rust
|
||||
uses: ./.github/actions/setup-system
|
||||
with:
|
||||
|
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
@ -6,6 +6,11 @@ on:
|
|||
|
||||
env:
|
||||
SPACEDRIVE_CUSTOM_APT_FLAGS: --no-install-recommends
|
||||
# From: https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/ci.yaml
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
|
||||
# Cancel previous runs of the same workflow on the same branch.
|
||||
concurrency:
|
||||
|
|
7
.github/workflows/mobile-ci.yml
vendored
7
.github/workflows/mobile-ci.yml
vendored
|
@ -18,6 +18,11 @@ on:
|
|||
env:
|
||||
SPACEDRIVE_CUSTOM_APT_FLAGS: --no-install-recommends
|
||||
SPACEDRIVE_CI: '1'
|
||||
# From: https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/ci.yaml
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
|
||||
# Cancel previous runs of the same workflow on the same branch.
|
||||
concurrency:
|
||||
|
@ -199,7 +204,7 @@ jobs:
|
|||
- name: Run Simulator
|
||||
uses: futureware-tech/simulator-action@v2
|
||||
with:
|
||||
model: 'iPhone 11'
|
||||
model: 'iPhone SE (3rd generation)'
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
|
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
@ -4,6 +4,12 @@ on:
|
|||
workflow_dispatch:
|
||||
# NOTE: For Linux builds, we can only build with Ubuntu. It should be the oldest base system we intend to support. See PR-759 & https://tauri.app/v1/guides/building/linux for reference.
|
||||
|
||||
# From: https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/release.yaml#L13-L21
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
|
||||
jobs:
|
||||
desktop-main:
|
||||
strategy:
|
||||
|
|
|
@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
|
|||
FROM base as build-base
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
|
||||
apt-get install build-essential git sudo unzip wget
|
||||
apt-get install build-essential git sudo unzip wget curl
|
||||
|
||||
RUN wget -qO- https://get.pnpm.io/install.sh | env SHELL=bash PNPM_HOME=/usr/share/pnpm sh -
|
||||
|
||||
|
@ -60,6 +60,15 @@ RUN wget -qO- https://sh.rustup.rs | sh -s -- -yq --profile minimal
|
|||
|
||||
ENV PATH="/root/.cargo/bin:$PATH"
|
||||
|
||||
# From: https://github.com/rust-lang/rust-analyzer/blob/master/.github/workflows/release.yaml#L13-L21
|
||||
ENV CARGO_NET_RETRY=10
|
||||
ENV CARGO_INCREMENTAL=0
|
||||
ENV RUSTUP_MAX_RETRIES=10
|
||||
|
||||
# Install mold (linker)
|
||||
RUN curl -L# 'https://github.com/rui314/mold/releases/download/v2.4.0/mold-2.4.0-x86_64-linux.tar.gz' \
|
||||
| sudo tar -xzf- -C /usr/local
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
|
||||
env CI=true ./scripts/setup.sh
|
||||
|
||||
|
|
Loading…
Reference in a new issue