From 8093faee191e66c6adb8c726c98b999e3e166341 Mon Sep 17 00:00:00 2001 From: Thomas Moerkerken <1309462+moerketh@users.noreply.github.com> Date: Mon, 31 Oct 2022 21:30:58 +0100 Subject: [PATCH] Update build pipeline (#1896) * bump action versions to fix build warnings * resolve warning on set-output * Replace replace toolchain action with rustup cmd * fix syntax * run apt-get update before installing * use apt-get --- .github/workflows/backend.yaml | 34 +++++++++++++----------- .github/workflows/frontend.yaml | 2 +- .github/workflows/reusable-workflow.yaml | 2 +- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/backend.yaml b/.github/workflows/backend.yaml index 9a80105ec..e0df00e8a 100644 --- a/.github/workflows/backend.yaml +++ b/.github/workflows/backend.yaml @@ -31,17 +31,18 @@ jobs: submodules: recursive - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 if: ${{ matrix.target == 'aarch64' }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 if: ${{ matrix.target == 'aarch64' }} - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - override: true + - name: "Install Rust" + run: | + rustup toolchain install ${{ env.RUST_VERSION }} --profile minimal --no-self-update + rustup default ${{ inputs.rust }} + shell: bash if: ${{ matrix.target == 'x86_64' }} - uses: actions/cache@v3 @@ -88,10 +89,11 @@ jobs: name: ${{ matrix.snapshot_download }} path: libs/js_engine/src/artifacts/ - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - override: true + - name: "Install Rust" + run: | + rustup toolchain install ${{ env.RUST_VERSION }} --profile minimal --no-self-update + rustup default ${{ inputs.rust }} + shell: bash if: ${{ matrix.target == 'x86_64' }} - uses: actions/cache@v3 @@ -105,7 +107,9 @@ jobs: key: ${{ runner.os }}-cargo-backend-${{ matrix.target }}-${{ hashFiles('backend/Cargo.lock') }} - name: Install dependencies - run: sudo apt-get install libavahi-client-dev + run: | + sudo apt-get update + sudo apt-get install libavahi-client-dev if: ${{ matrix.target == 'x86_64' }} - name: Check Git Hash @@ -193,11 +197,11 @@ jobs: submodules: recursive - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 if: ${{ matrix.target == 'aarch64' }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 if: ${{ matrix.target == 'aarch64' }} - run: mkdir -p ~/.cargo/bin @@ -230,8 +234,8 @@ jobs: -e CARGO_TERM_COLOR=${{ env.CARGO_TERM_COLOR }} \ -P ubuntu:20.04 \ sh -c ' - apt update && - apt install -y ca-certificates && + apt-get update && + apt-get install -y ca-certificates && cd /home/rust/src && mkdir -p ~/.cargo/bin && tar -zxvf nextest-aarch64.tar.gz -C ${CARGO_HOME:-~/.cargo}/bin && diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index 7436841df..8a4eb5170 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -24,7 +24,7 @@ jobs: - name: Get npm cache directory id: npm-cache-dir run: | - echo "::set-output name=dir::$(npm config get cache)" + echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 id: npm-cache with: diff --git a/.github/workflows/reusable-workflow.yaml b/.github/workflows/reusable-workflow.yaml index e300af11b..2a3b3b6e3 100644 --- a/.github/workflows/reusable-workflow.yaml +++ b/.github/workflows/reusable-workflow.yaml @@ -23,7 +23,7 @@ jobs: submodules: recursive - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build image run: ${{ inputs.build_command }}