diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml new file mode 100644 index 000000000..df624c0a8 --- /dev/null +++ b/.github/workflows/macos-build.yml @@ -0,0 +1,44 @@ +name: macos-build + +on: + workflow_dispatch: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: "-Dwarnings" + +jobs: + + build-macos: + runs-on: ${{ matrix.os }} + strategy: + matrix: + - build: macos + os: macos-latest + target: x86_64-apple-darwin + + 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