Skip to content

Commit

Permalink
Add Github workflow and Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
aksh1t committed Sep 25, 2024
1 parent 70493dd commit 742f67a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Running build.yml locally

### Steps:

1. Install [nektos/act](https://github.com/nektos/act) (Simplest way is to install using homebrew by: `brew install act`)
2. Install the `gh` command line tool (`brew install gh`) and authenticate it using `gh auth login`.
3. Make sure your github account has read access to the [cli-binary](https://github.com/PreternaturalAI/cli-binary) repo.
4. From the root directory `merge`, run the following command:

```
sudo act -P macos-latest=-self-hosted -W '.github/workflows/build.yml' -s GITHUB_TOKEN="$(gh auth token)"
```

**Note:** `sudo` is required here because an internal dependency ([`maxim-lobanov/setup-xcode@v1`](https://github.com/maxim-lobanov/setup-xcode/blob/7f352e61cbe8130c957c3bc898c4fb025784ea1e/src/xcode-selector.ts#L51)) uses the `sudo` command and causes `act` execution to wait for a password interactively.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Merge For All Platforms (Xcode 16 & Xcode 15.4)
on:
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: merge
- name: Cache derived data
if: ${{ !env.ACT }} # Skipping when run locally.
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-derived-data
restore-keys: |
${{ runner.os }}-derived-data
- name: Run Preternatural Build (Xcode 16)
uses: PreternaturalAI/github-action@main
with:
command: build
derived_data_path: ~/Library/Developer/Xcode/DerivedData
xcode-version: '16'
build_all_platforms: 'true'
working-directory: 'merge'
- name: Run Preternatural Build (Xcode 15.4)
uses: PreternaturalAI/github-action@main
with:
command: build
derived_data_path: ~/Library/Developer/Xcode/DerivedData
xcode-version: '15.4'
build_all_platforms: 'true'
working-directory: 'merge'

0 comments on commit 742f67a

Please sign in to comment.