From 3cff753275f0246c280c917ea55fa42efbe806c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20M=C3=BCndelein?= Date: Mon, 12 Jun 2023 09:38:19 +0200 Subject: [PATCH] Add cross compile release flow --- .editorconfig | 4 ++++ .gitea/workflows/main.yml | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/.editorconfig b/.editorconfig index 3a2e9a3..62c470b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,5 +12,9 @@ end_of_line = lf indent_style = space indent_size = 2 +[*.{yaml,yml}] +indent_style = space +indent_size = 2 + [*.{md,markdown}] trim_trailing_whitespace = false diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 02bd663..493d2d1 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -18,3 +18,26 @@ jobs: components: rustfmt - name: cargo fmt --check run: cargo fmt --check --all + cross: + runs-on: ubuntu-latest + name: ubuntu / stable / cross-${{ matrix.target }} + strategy: + fail-fast: false + matrix: + target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu"] + steps: + - uses: actions/checkout@v3 + - name: Install stable + uses: https://github.com/dtolnay/rust-toolchain@stable + - uses: https://github.com/taiki-e/install-action@cross + - name: cross compile for ${{ matrix.target }} + run: cross build --target ${{ matrix.target }} --release + - uses: actions/release-action@main + with: + files: |- + target/${{ matrix.target }}/release/crabidy-server + api_key: '${{secrets.RELEASE_TOKEN}}' + + + +