Merge pull request #3285 from rtfeldman/mac-os-getting-started

updated getting started for MacOS
This commit is contained in:
Anton-4 2022-06-21 17:21:55 +02:00 committed by GitHub
commit 20c372236d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 6 deletions

View File

@ -24,14 +24,14 @@ jobs:
- name: package release
run: ./ci/package_release.sh roc_darwin_apple_silicon.tar.gz
- name: Create pre-release with test_archive.tar.gz
uses: WebFreak001/deploy-nightly@v1.1.0
uses: Anton-4/deploy-nightly@1609d8dfe211b078674801113ab7a2ec2938b2a9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/rtfeldman/roc/releases/51880579/assets{?name,label}
release_id: 51880579
asset_path: ./roc_darwin_apple_silicon.tar.gz
asset_name: roc_nightly-darwin_apple_silicon-$$.tar.gz # $$ inserts date (YYYYMMDD) and 6 letter commit hash
asset_name: roc_nightly-macos_apple_silicon-$$.tar.gz # $$ inserts 6 char commit hash and date (YYYY-MM-DD)
asset_content_type: application/gzip
max_releases: 6
max_releases: 3

View File

@ -18,14 +18,14 @@ jobs:
- name: install dependencies, build, run tests, build release
run: ./ci/safe-earthly.sh +build-nightly-release
- name: Create pre-release with test_archive.tar.gz
uses: WebFreak001/deploy-nightly@v1.1.0
uses: Anton-4/deploy-nightly@1609d8dfe211b078674801113ab7a2ec2938b2a9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/rtfeldman/roc/releases/51880579/assets{?name,label}
release_id: 51880579
asset_path: ./roc_linux_x86_64.tar.gz
asset_name: roc_nightly-linux_x86_64-$$.tar.gz # $$ inserts date (YYYYMMDD) and 6 letter commit hash
asset_name: roc_nightly-linux_x86_64-$$.tar.gz # $$ inserts 6 char commit hash and date (YYYY-MM-DD)
asset_content_type: application/gzip
max_releases: 6
max_releases: 3

View File

@ -16,6 +16,7 @@ Many programs can however be compiled correctly. Check out [examples](examples)
## Getting started
- [Linux x86](getting_started/linux_x86.md)
- [MacOS Apple Silicon](getting_started/macos_apple_silicon.md)
- [Windows](getting_started/windows.md)
- [Other](getting_started/other.md)

View File

@ -0,0 +1,30 @@
0. Download the latest nightly from the assets [here](https://github.com/rtfeldman/roc/releases).
0. To prevent "roc can't be opened because Apple can't check it...":
```
xattr -d com.apple.quarantine roc_nightly-darwin_apple_silicon-<VERSION>.tar.gz
```
0. Untar the archive:
```
roc_nightly-darwin_apple_silicon-<VERSION>.tar.gz
```
0. To be able to run examples:
- for the Rust example:
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
- for the zig example:
```
brew install zig
```
0. Run examples with:
```
# Rust. If you installed rust in this terminal you'll need to open a new one first!
./roc examples/hello-world/rust-platform/helloRust.roc
# Zig
./roc examples/hello-world/zig-platform/helloZig.roc
# C
./roc examples/hello-world/c-platform/helloC.roc
```
0. See [here](../README.md#examples) for the other examples.
**Tip:** when programming in roc, we recommend to execute `./roc check myproject/Foo.roc` before `./roc myproject/Foo.roc` or `./roc build myproject/Foo.roc`. `./roc check` can produce clear error messages in cases where building/running may panic.