From c3f0aa94bf672464b70e0bfee671fcc96df8add4 Mon Sep 17 00:00:00 2001 From: Tpt Date: Mon, 27 Feb 2023 15:08:37 +0100 Subject: [PATCH] CI: Builds also the server for ARM linux --- .github/workflows/artifacts.yml | 16 ++++++++++++++-- .github/workflows/release.yml | 20 +++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 0ae7d4d9..61df0101 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -11,19 +11,31 @@ concurrency: jobs: binary_linux: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: true - - run: rustup update + - run: rustup update && rustup target add aarch64-unknown-linux-gnu + - run: | + sudo apt install -y g++-aarch64-linux-gnu + mkdir .cargo + echo -e "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml - uses: Swatinem/rust-cache@v2 - run: cargo build --release working-directory: ./server + - run: cargo build --release --target aarch64-unknown-linux-gnu + working-directory: ./server + env: + BINDGEN_EXTRA_CLANG_ARGS: --sysroot /usr/aarch64-linux-gnu - uses: actions/upload-artifact@v3 with: name: oxigraph_server_x86_64_linux_gnu path: target/release/oxigraph_server + - uses: actions/upload-artifact@v3 + with: + name: oxigraph_server_aarch64-linux_gnu + path: target/aarch64-unknown-linux-gnu/release/oxigraph_server binary_mac: runs-on: macos-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11a090bb..1d6c052e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -241,17 +241,29 @@ jobs: git push publish_binary_linux: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: true + - run: rustup update && rustup target add aarch64-unknown-linux-gnu + - run: | + sudo apt install -y g++-aarch64-linux-gnu + mkdir .cargo + echo -e "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml - run: cargo build --release working-directory: ./server + - run: cargo build --release --target aarch64-unknown-linux-gnu + working-directory: ./server + env: + BINDGEN_EXTRA_CLANG_ARGS: --sysroot /usr/aarch64-linux-gnu - run: mv target/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu + - run: mv target/aarch64-unknown-linux-gnu/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_aarch64_linux_gnu - uses: softprops/action-gh-release@v1 with: - files: oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu + files: | + oxigraph_server_${{ github.event.release.tag_name }}_x86_64_linux_gnu + oxigraph_server_${{ github.event.release.tag_name }}_aarch64_linux_gnu publish_binary_mac: runs-on: macos-latest @@ -272,7 +284,9 @@ jobs: - run: mv target/aarch64-apple-darwin/release/oxigraph_server oxigraph_server_${{ github.event.release.tag_name }}_aarch64_apple - uses: softprops/action-gh-release@v1 with: - files: oxigraph_server_${{ github.event.release.tag_name }}_x86_64_apple + files: | + oxigraph_server_${{ github.event.release.tag_name }}_x86_64_apple + oxigraph_server_${{ github.event.release.tag_name }}_aarch64_apple publish_binary_windows: runs-on: windows-latest