File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,15 +10,31 @@ jobs:
1010 - run : echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
1111 - name : Check out repository code
1212 uses : actions/checkout@v4
13+ with :
14+ java-version : ' 8'
1315 - run : echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
1416 - run : echo "🖥️ The workflow is now ready to test your code on the runner."
1517 - name : List files in the repository
1618 run : |
1719 ls ${{ github.workspace }}
1820 - run : echo "🍏 This job's status is ${{ job.status }}."
1921
20- - run : mkdir build
22+ - run : mkdir ${{ github.workspace }}/ build
2123 - run : cd build
2224 - run : cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug ${{ github.workspace }}/minijvm/c
2325 - run : cmake --build .
2426 - run : cmake --build . --target mini_jvm
27+ - run : ls -l
28+
29+ # - name: Run build jar
30+ # run: |
31+ # cd ${{ github.workspace }}/binary
32+ # sh build_jar.sh
33+ # working-directory: ${{ github.workspace }}/binary
34+ # - name: Run build bin
35+ # run: |
36+ # cd ${{ github.workspace }}/binary
37+ # sh build_mac_linux.sh
38+ # working-directory: ${{ github.workspace }}/binary
39+ #
40+ # - run: ${{ github.workspace }}/binary/centos_x64/mini_jvm -bootclasspath ${{ github.workspace }}/binary/lib/minijvm_rt.jar -cp ${{ github.workspace }}/binary/libex/minijvm_test.jar test.Foo3
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11![ ] ( /doc/img/mini_jvm_64.png )
2- [ ![ Build Status ] ( https://travis-ci.org /digitalgust/miniJVM.svg?branch=master )] ( https://travis-ci.org/digitalgust/miniJVM )
2+ < img src = " https://github.com /digitalgust/miniJVM/actions/workflows/github-actions-demo.yml/badge.svg " />
33
44<span id =" linkhome " />
55
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33echo " Requirement: jdk1.8+ jar javac "
44
@@ -8,27 +8,27 @@ JAR=jar
88
99# returns the JDK version.
1010# 8 for 1.8.0_nn, 9 for 9-ea etc, and "no_java" for undetected
11- function jdk_version() {
12- local result
13- local java_cmd
11+ jdk_version () {
12+ result= " "
13+ java_cmd= " "
1414 if [[ -n $( type -p java) ]]
1515 then
1616 java_cmd=java
1717 elif [[ (-n " $JAVA_HOME " ) && (-x " $JAVA_HOME /bin/java" ) ]]
1818 then
1919 java_cmd=" $JAVA_HOME /bin/java"
2020 fi
21- local IFS=$' \n '
21+ IFS=$' \n '
2222 # remove \r for Cygwin
23- local lines=$( " $java_cmd " -Xms32M -Xmx32M -version 2>&1 | tr ' \r' ' \n' )
23+ lines=$( " $java_cmd " -Xms32M -Xmx32M -version 2>&1 | tr ' \r' ' \n' )
2424 if [[ -z $java_cmd ]]
2525 then
2626 result=no_java
2727 else
2828 for line in $lines ; do
2929 if [[ (-z $result ) && ($line = * " version \" " * ) ]]
3030 then
31- local ver=$( echo $line | sed -e ' s/.*version "\(.*\)"\(.*\)/\1/; 1q' )
31+ ver=$( echo $line | sed -e ' s/.*version "\(.*\)"\(.*\)/\1/; 1q' )
3232 # on macOS, sed doesn't support '?'
3333 if [[ $ver = " 1." * ]]
3434 then
@@ -44,7 +44,7 @@ function jdk_version() {
4444
4545
4646
47- function build_jar() {
47+ build_jar () {
4848 rm -rf $3 /$1
4949 mkdir classes
5050 find $2 /java -name " *.java" > source.txt
@@ -102,5 +102,3 @@ echo "build ../mobile/assets/resfiles/ExApp.jar"
102102$( build_jar ExApp.jar ../mobile/java/ExApp/src/main ../mobile/assets/resfiles " ../mobile/assets/resfiles/minijvm_rt.jar" " ../mobile/assets/resfiles/glfm_gui.jar:../mobile/assets/resfiles/xgui.jar" )
103103
104104
105-
106-
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33
44# ${GCCHOME} setup as: /usr/bin/gcc
@@ -47,6 +47,7 @@ echo "compile glfw_gui"
4747CSRC=" ../desktop/glfw_gui/c"
4848SRCLIST=` find ${CSRC} -type f -name " *.c" -not -path " ${CSRC} /cmake-*" -not -path " ${CSRC} /.*" `
4949#
50+
5051if [[ $UNAME == * $OSNAME * ]]
5152then
5253 ${GCC} -shared -fPIC -o ${LIBFILE} -I../minijvm/c/jvm -I${CSRC} / -I${CSRC} /deps/include -L${CSRC} /deps/lib/${LIBDIR} -lpthread -lglfw3 -framework Cocoa -framework IOKit -framework OpenGL -framework CoreFoundation -framework CoreVideo $SRCLIST
You can’t perform that action at this time.
0 commit comments