Skip to content

Commit

Permalink
fix(ci-rs.yml): Wrong script used for ci-rs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
miniben-90 committed Aug 6, 2024
1 parent f6a5c30 commit cc31092
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
18 changes: 2 additions & 16 deletions .github/docker-ubuntu-rust-install.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
#!bin/bash

Xvfb :0 &

sleep 1

gpg-agent --daemon

sleep 1

xfce4-session &

sleep 1
target=${1:-''}

curl https://sh.rustup.rs -sSf | bash -s -- -y

sudo apt install musl-tools -y

rustup target add $CARGO_TARGET_ENV
rustup target add $target

curl -L -o /tmp/firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"

Expand All @@ -25,7 +15,3 @@ sudo tar xjf /tmp/firefox.tar.bz2 -C /opt/
/opt/firefox/firefox --safe-mode https://github.com/ &

sleep 1

cd /work

cargo test --target $CARGO_TARGET_ENV
13 changes: 11 additions & 2 deletions .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,17 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.settings.image }}
options: --user 0:0 -e CARGO_TARGET_ENV=${{ matrix.settings.target }} -v ${{ github.workspace }}/.github/docker-ubuntu-install.sh:/usr/local/docker-ubuntu-install.sh -v ${{ github.workspace }}/x-win-rs:/work -w /work
run: sh /usr/local/docker-ubuntu-install.sh
options: --user 0:0 -v ${{ github.workspace }}/.github/docker-ubuntu-rust-install.sh:/usr/local/docker-ubuntu-rust-install.sh -v ${{ github.workspace }}/x-win-rs:/work -w /work
run: |
Xvfb :0 &
sleep 1
gpg-agent --daemon
sleep 1
xfce4-session &
sleep 1
sh /usr/local/docker-ubuntu-rust-install.sh ${{ matrix.settings.target }}
cd /work
cargo test --target ${{ matrix.settings.target }}
- name: Build
run: cargo build --release --target ${{ matrix.settings.target }}
Expand Down

0 comments on commit cc31092

Please sign in to comment.