From 21006f035c86940e7d48ae61e1fd638f12f58877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sun, 9 Jun 2024 18:29:45 -0300 Subject: [PATCH 1/3] github: workflow: rust: Update linux targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 930f4645..e2c23e35 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -118,13 +118,13 @@ jobs: TARGET: x86_64-apple-darwin - os: ubuntu-latest - TARGET: arm-unknown-linux-musleabihf + TARGET: aarch64-unknown-linux-gnu - os: ubuntu-latest - TARGET: armv7-unknown-linux-musleabihf + TARGET: armv7-unknown-linux-gnueabihf - os: ubuntu-latest - TARGET: x86_64-unknown-linux-musl + TARGET: x86_64-unknown-linux-gnu - os: windows-latest TARGET: x86_64-pc-windows-msvc From 011de80c3062a5f70f0d94026db1aa1f85dc8d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sun, 9 Jun 2024 18:30:23 -0300 Subject: [PATCH 2/3] github: workflows: rust: Use rustup to install rust and latest cross for linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/rust.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e2c23e35..05e0fb70 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -135,17 +135,26 @@ jobs: run: echo "${{ matrix.TARGET }}" - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1.0.1 - with: - toolchain: stable - target: ${{ matrix.TARGET }} - override: true - - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --verbose --release --target=${{ matrix.TARGET }} + - name: Install build dependencies - Rustup + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile default --target ${{ matrix.TARGET }} -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + # For linux, it's necessary to use cross from the git repository to avoid glibc problems + # Ref: https://github.com/cross-rs/cross/issues/1510 + - name: Install cross for linux + if: contains(matrix.TARGET, 'linux') + run: | + cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 + + - name: Install cross for mac and windows + if: ${{ !contains(matrix.TARGET, 'linux') }} + run: | + cargo install cross + + - name: Build + run: | + cross build --verbose --release --target=${{ matrix.TARGET }} - name: Rename run: cp target/${{ matrix.TARGET }}/release/eframe_template${{ matrix.EXTENSION }} eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} From 202a29a83e205c921278fa419504adac2f83f8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sun, 9 Jun 2024 18:31:21 -0300 Subject: [PATCH 3/3] github: workflows: rust: Remove apple x86_64 for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's failing with the latest changes Signed-off-by: Patrick José Pereira --- .github/workflows/rust.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 05e0fb70..5a5854f7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -114,9 +114,6 @@ jobs: - os: macos-latest TARGET: aarch64-apple-darwin - - os: macos-latest - TARGET: x86_64-apple-darwin - - os: ubuntu-latest TARGET: aarch64-unknown-linux-gnu