From f2460a8acb02a534eb61207f4afdf2312e85c0b0 Mon Sep 17 00:00:00 2001 From: Andrea Cracco Date: Fri, 23 Aug 2024 12:23:40 +0200 Subject: [PATCH] Add github ci workflows --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..daa464c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +name: CI + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + linux: + strategy: + matrix: + platform: + - runner: ubuntu-latest + target: x86_64-unknown-linux-gnu + - runner: ubuntu-latest + target: aarch64-unknown-linux-gnu + - runner: ubuntu-latest + target: x86_64-unknown-linux-musl + - runner: ubuntu-latest + target: aarch64-unknown-linux-musl + runs-on: ${{ matrix.platform.runner }} + steps: + - uses: actions/checkout@v4 + - name: Rust setup + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.platform.target }} + - name: Build cli + run: cargo build --release --target ${{ matrix.platform.target }} --locked -p ggcat_cmdline + + windows: + strategy: + matrix: + platform: + - runner: windows-latest + target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.platform.runner }} + steps: + - uses: actions/checkout@v4 + - name: Rust setup + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.platform.target }} + - name: Build cli + run: cargo build --release --target ${{ matrix.platform.target }} --locked -p ggcat_cmdline + + macos: + strategy: + matrix: + platform: + - runner: macos-12 + target: x86_64-apple-darwin + - runner: macos-14 + target: aarch64-apple-darwin + runs-on: ${{ matrix.platform.runner }} + steps: + - uses: actions/checkout@v4 + - name: Rust setup + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.platform.target }} + - name: Build cli + run: cargo build --release --target ${{ matrix.platform.target }} --locked -p ggcat_cmdline \ No newline at end of file