From ee4d7e42ef4c1a270455621a64d4910b5009c920 Mon Sep 17 00:00:00 2001 From: Jan Tache Date: Sun, 10 Dec 2023 15:33:19 -0800 Subject: [PATCH] ci: minor edits to rust.yml, add untested macos build --- .github/workflows/macos-build.yml | 39 +++++++++++++++++++++++++++++++ .github/workflows/rust.yml | 10 ++++---- 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/macos-build.yml diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml new file mode 100644 index 000000000..afcf185e1 --- /dev/null +++ b/.github/workflows/macos-build.yml @@ -0,0 +1,39 @@ +name: macos-build + +on: + workflow_dispatch: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: "-Dwarnings" + +jobs: + + build-macos: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + with: + shared-key: "persist-cross-job" + workspaces: ./ + - name: Build release + run: cargo build --release + - name: Move build artifact + shell: bash + run: | + mv target/release/kanata ./kanata_macos + - name: Build release with cmd feature + run: cargo build --release --features cmd + - name: Move build artifact with cmd feature + shell: bash + run: | + mv target/release/kanata ./kanata_macos_cmd_allowed + - uses: actions/upload-artifact@v3 + with: + name: macos-binaries + path: | + ./kanata_macos + ./kanata_macos_cmd_allowed diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3455a9eb3..87e6199ed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,8 +9,7 @@ on: - keyberon/**/* - cfg_samples/**/* - parser/**/* - - test_cfgs/**/* - - .github/workflows/**/* + - .github/workflows/rust.yml pull_request: branches: [ "main" ] paths: @@ -19,8 +18,7 @@ on: - keyberon/**/* - parser/**/* - cfg_samples/**/* - - test_cfgs/**/* - - .github/workflows/**/* + - .github/workflows/rust.yml env: CARGO_TERM_COLOR: always @@ -39,7 +37,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # You can add more, for any target you'd like! + include: - build: linux os: ubuntu-latest @@ -52,7 +50,7 @@ jobs: - build: macos os: macos-latest target: x86_64-apple-darwin - + steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2