Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test on macos too #174

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/tests_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ concurrency:

jobs:
build-and-test:
runs-on: [ubuntu-22.04]
strategy:
fail-fast: false
matrix:
# macos-11 uses x86-64 machine, macos-14 uses aarch64
os: [ macos-11, macos-14, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

Expand All @@ -22,7 +27,10 @@ jobs:
with:
name: enigmaticsunrise
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: print architecture
run: uname -m

# the result folder is produced by the previous step
- name: Run all tests
run: nix develop -c sh -c 'export ROC=roc && ./ci_scripts/all_tests.sh'
run: nix develop -c sh -c 'export ROC=roc && ./ci_scripts/all_tests.sh'
9 changes: 6 additions & 3 deletions ci_scripts/all_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ expect ci_scripts/expect_scripts/MultipleRocFiles.exp
$ROC build ./examples/EncodeDecode/main.roc
expect ci_scripts/expect_scripts/EncodeDecode.exp

$ROC build --lib ./examples/GoPlatform/main.roc --output examples/GoPlatform/platform/libapp.so
go build -C examples/GoPlatform/platform -buildmode=pie -o dynhost
$ROC preprocess-host ./examples/GoPlatform/main.roc
#$ROC build --lib ./examples/GoPlatform/main.roc --output examples/GoPlatform/platform/libapp.so
#go build -C examples/GoPlatform/platform -buildmode=pie -o dynhost
#$ROC preprocess-host ./examples/GoPlatform/main.roc
go build -C examples/GoPlatform/platform -buildmode=c-archive -o libhost.a
cp examples/GoPlatform/platform/libhost.a examples/GoPlatform/platform/macos-arm64.a

$ROC build --prebuilt-platform ./examples/GoPlatform/main.roc

os_info=$(lsb_release -a 2>/dev/null)
Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/expect_scripts/DotNetPlatform.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/expect

# uncomment line below for debugging
# exp_internal 1
exp_internal 1

set timeout 25

Expand Down
3 changes: 2 additions & 1 deletion examples/GoPlatform/platform/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

/*
#cgo LDFLAGS: -L. -lapp
#cgo CFLAGS: -Wno-main-return-type
#include "./host.h"
*/
import "C"
Expand All @@ -12,6 +12,7 @@ import (
"unsafe"
)

// export main
func main() {
var str C.struct_RocStr
C.roc__mainForHost_1_exposed_generic(&str)
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading