You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable cross-platform support for linux-x86-64, windows-x86-64, macos-x86-64 and macos-arm64
* Provide binaries for Souffle programs using git lfs.
* Add dockerized way to build native binaries (except macOS).
* Extend CI for Windows and macOS
* Update README
# net-ssa [](https://github.com/m-carrasco/net-ssa/actions/workflows/build.yml)[](https://github.com/m-carrasco/net-ssa/actions/workflows/docker-ubuntu.yml)
2
2
3
3
Microsoft's high-level programming languages, such as C#, are compiled to CIL bytecode. The instruction set architecture of CIL operates on a stack virtual machine with local variables. CIL instruction's operands are implicit because they are elements in the stack. `net-ssa` provides a register-based intermediate representation for CIL where operands become explicit.
4
4
@@ -14,40 +14,64 @@ If you have any questions or suggestions, feel free to open an issue to discuss
It is possible to develop and test `net-ssa` without installing any dependency in your system but [Docker](https://docs.docker.com/get-docker/).
26
+
However, it is adviced to compile the project at least once in the host system. This is mainly for downloading dependencies and correctly setting up any IDE.
4.`docker run --name dev -v $(pwd):/net-ssa -ti net-ssa/net-ssa`
30
+
3.`git lfs checkout`
31
+
* Install [git lfs](https://git-lfs.github.com/)
32
+
4.`dotnet build && dotnet test`
33
+
* This is optional, it requires installing dotnet.
34
+
5.`docker build -t net-ssa/net-ssa .`
35
+
6.`docker run --name dev -v $(pwd):/net-ssa -ti net-ssa/net-ssa`
29
36
* This is now an interactive container. `$(pwd)` of the host is shared with the container as `net-ssa` source code folder.
30
-
5. Introduce changes in the source code using your IDE as usual.
31
-
6. Build and test in the container, execute these commands in the container terminal:
37
+
7. Introduce changes in the source code using your IDE as usual.
38
+
8. Build and test in the container, execute these commands in the container terminal:
32
39
*`cd build`
33
-
*`make build-dotnet`
40
+
*`(cd /net-ssa && dotnet build)`
34
41
*`lit integration-test/ -vvv`
35
42
*`exit # once you finish working`
36
-
7.`docker start -i dev # to resume the container terminal`
43
+
9.`docker start -i dev # to resume the container terminal`
44
+
37
45
38
46
## Build from sources
39
47
40
-
### Ubuntu 20.04.3
48
+
### Ubuntu 20.04
49
+
50
+
1.`cd net-ssa`
51
+
2.`git lfs checkout`
52
+
* Install [git lfs](https://git-lfs.github.com/)
53
+
3.`dotnet build`
54
+
4.`dotnet test`
55
+
5.`mkdir build`
56
+
6.`cd build && cmake ..`
57
+
7.`lit integration-test/ -vvv`
58
+
59
+
To know the required dependencies for the integration tests (`cmake` and `lit` step), please check the [Dockerfile](https://github.com/m-carrasco/net-ssa/blob/main/Dockerfile).
60
+
The Dockerfile executes the shell scripts under the [ci](https://github.com/m-carrasco/net-ssa/tree/main/ci) folder. You would just need to execute them once in your system.
`net-ssa` has native dependencies, which are shipped in the project already. You shouldn't need to build them. Usually, this is only required for development. The supported systems are:
70
+
* Linux - x86-64
71
+
* Windows - x86-64
72
+
* MacOS - x86-64 and arm64
49
73
50
-
It has not been tested yet. However, it should work as long as Souffle can be installed. Souffle can run there using _Windows Subsystem for Linux_.
74
+
In case they must be re-built, [`./net-ssa/souffle/build-all-with-docker.sh`](https://github.com/m-carrasco/net-ssa/blob/main/souffle/build-all-with-docker.sh) is available. The script compiles these dependencies from scratch using the source code in your repository. Under the hood, the script isolates this process using Docker. This only builds the Linux and Windows dependencies. Cross-compilation for MacOS is incredible difficult. If you are a MacOS user, check the CI to figure out the required dependencies and execute `build-souffle-macos-x86-64-arm64.sh`.
0 commit comments