Skip to content

Commit dfb87e4

Browse files
Fix CI compilation error
1 parent caf422e commit dfb87e4

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

.github/workflows/ci.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,13 @@ jobs:
135135
needs: build
136136
steps:
137137
- uses: actions/checkout@v4
138+
- id: install
139+
run: |
140+
rustup override set stable
141+
rustup update stable
138142
139-
- name: get test binaries from cache
140-
uses: actions/download-artifact@v3
141-
with:
142-
name: test-binaries-${{ github.sha }}
143-
path: ./test-binaries/
143+
- name: restore build & cargo cache
144+
uses: Swatinem/rust-cache@v2
144145

145146
- name: Launch postgres and min.io
146147
run: |

dockerfiles/Dockerfile-gui-tests

-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
55
build-essential git curl cmake gcc g++ pkg-config libmagic-dev \
66
libssl-dev zlib1g-dev ca-certificates
77

8-
# Install the stable toolchain with rustup
9-
RUN curl https://sh.rustup.rs >/tmp/rustup-init && \
10-
chmod +x /tmp/rustup-init && \
11-
/tmp/rustup-init -y --no-modify-path --default-toolchain stable --profile minimal
12-
ENV PATH=/root/.cargo/bin:$PATH
13-
148
RUN apt-get update && apt-get install -y \
159
ca-certificates \
1610
curl \

dockerfiles/run-gui-tests.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,30 @@ docker-compose stop web
77

88
docker-compose up -d db s3
99

10+
# If we have a .env file, we need to temporarily move it so
11+
# it doesn't make sqlx fail compilation.
12+
if [ -f .env ]; then
13+
mv .env .tmp.env
14+
fi
15+
1016
# We add the information we need.
1117
cargo run -- database migrate
18+
cargo run -- build update-toolchain
1219
cargo run -- build crate sysinfo 0.23.4
1320
cargo run -- build crate sysinfo 0.23.5
1421
cargo run -- build add-essential-files
1522

23+
if [ -f .tmp.env ]; then
24+
mv .tmp.env .env
25+
fi
26+
1627
# In case we don't have a `.env`, we create one.
1728
if [ ! -f .env ]; then
18-
cp .env.sample .env
29+
cp .env.sample .env
1930
fi
2031

2132
. .env
33+
2234
cargo run -- start-web-server &
2335
SERVER_PID=$!
2436

0 commit comments

Comments
 (0)