diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88c37db..68719c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + PATH: jobs: build-linux: @@ -26,8 +27,11 @@ jobs: - aarch64-unknown-linux-musl steps: + - name: Set path variable + run: echo $HOME/.cargo/bin >> $GITHUB_PATH + - name: Switch toolchain - run: $HOME/.cargo/bin/rustup default stable-${{ matrix.target }} + run: rustup default stable-${{ matrix.target }} - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index ab705ce..f261c91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,9 @@ RUN apt-get install -yqq wget build-essential yasm libavutil-dev libavcodec-dev WORKDIR /opt/rust RUN wget https://sh.rustup.rs -O rustup-init.sh RUN chmod +x rustup-init.sh -RUN ./rustup-init.sh -y -t x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-gnu aarch64-unknown-linux-musl +RUN ./rustup-init.sh -y +RUN $HOME/.cargo/bin/rustup install --force-non-host stable-x86_64-unknown-linux-gnu +RUN $HOME/.cargo/bin/rustup install --force-non-host stable-x86_64-unknown-linux-musl +RUN $HOME/.cargo/bin/rustup install --force-non-host stable-aarch64-unknown-linux-gnu +RUN $HOME/.cargo/bin/rustup install --force-non-host stable-aarch64-unknown-linux-musl