22
.github/workflows/c-cpp.yml
vendored
Normal file
22
.github/workflows/c-cpp.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Java CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: make
|
||||||
|
run: make jar
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v1.0.0
|
||||||
|
with:
|
||||||
|
name: MTGClone.jar
|
||||||
|
path: MTGClone.jar
|
||||||
12
Makefile
12
Makefile
@ -7,13 +7,14 @@ default:
|
|||||||
@echo \"make run\" to run Driver class
|
@echo \"make run\" to run Driver class
|
||||||
@echo \"make jar\" to compile executable jar
|
@echo \"make jar\" to compile executable jar
|
||||||
@echo \"make clean\" to clean up artifacts
|
@echo \"make clean\" to clean up artifacts
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(JCC) $(JFLAGS) Driver.java
|
$(JCC) $(JFLAGS) Driver.java
|
||||||
run:
|
|
||||||
$(JCC) $(JFLAGS) Driver.java
|
run: jar
|
||||||
java Driver
|
java -jar MTGClone.jar
|
||||||
jar:
|
|
||||||
$(JCC) $(JFLAGS) Driver.java
|
jar: build
|
||||||
@echo "Manifest-Version: 1.0" > manifest.txt
|
@echo "Manifest-Version: 1.0" > manifest.txt
|
||||||
@echo "Class-Path: ." >> manifest.txt
|
@echo "Class-Path: ." >> manifest.txt
|
||||||
@echo "Main-Class: Driver" >> manifest.txt
|
@echo "Main-Class: Driver" >> manifest.txt
|
||||||
@ -21,6 +22,7 @@ jar:
|
|||||||
jar -cmf manifest.txt MTGClone.jar *.class
|
jar -cmf manifest.txt MTGClone.jar *.class
|
||||||
$(RM) manifest.txt
|
$(RM) manifest.txt
|
||||||
$(RM) *.class
|
$(RM) *.class
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) *.class
|
$(RM) *.class
|
||||||
$(RM) manifest.txt
|
$(RM) manifest.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user