Skip to content

Commit 6e2c8ec

Browse files
Merge pull request #1 from scopeInfinity/ci
Improve Github Actions
2 parents bd40d6f + 7ab29ea commit 6e2c8ec

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

.github/workflows/c-cpp.yml renamed to .github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI
1+
name: CI
22

33
on:
44
push:
@@ -13,5 +13,13 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16+
- name: install dependencies
17+
run: sudo apt install nasm
1618
- name: make
1719
run: make all
20+
- name: Upload artifacts
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: artifacts
24+
path: output/
25+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode/
2-
build/
2+
build/
3+
output/

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
BUILD = build
2+
OUTPUT = output
23
SIMULATOR_FLAG := -DOPC_SIM_ENABLED
34
OPC_CFLAGS = -nostdlib -nodefaultlibs
45

5-
.PHONY: clean prep all
6+
.PHONY: clean prep all artifacts
67

7-
all: prep $(BUILD)/greeting $(BUILD)/sim_greeting $(BUILD)/sample_rom_text.txt
8+
all: prep $(BUILD)/greeting $(BUILD)/sim_greeting artifacts
89

910
clean:
1011
rm -f $(BUILD)/*
1112

1213
prep:
1314
mkdir -p $(BUILD)/
15+
mkdir -p $(OUTPUT)/
1416

1517
# simulator specific rules
1618
$(BUILD)/sim_o: lib/sim.c
@@ -45,5 +47,12 @@ $(BUILD)/greeting_o: greetings.c
4547
$(BUILD)/text_to_led: text_to_led.c $(BUILD)/font_o
4648
gcc -o $@ $^ -I include/
4749

48-
$(BUILD)/sample_rom_text.txt: $(BUILD)/text_to_led
50+
# generate artifacts
51+
52+
artifacts: $(OUTPUT)/sample_rom_text.txt $(OUTPUT)/objdump_greetings.txt
53+
54+
$(OUTPUT)/sample_rom_text.txt: $(BUILD)/text_to_led
4955
$^ "Happy Diwali!" > $@
56+
57+
$(OUTPUT)/objdump_greetings.txt: $(BUILD)/greeting
58+
objdump -D $(BUILD)/greeting > $@

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[![CI](https://github.com/scopeInfinity/OurPC/actions/workflows/ci.yml/badge.svg)](https://github.com/scopeInfinity/OurPC/actions/workflows/ci.yml)
2+
3+
# OurPC
4+
(picking a name is hard and is deferred for later)
5+
6+
The eventual goal(?) is to build a general-purpose processor integrated with simple input (e.g. buttons) and output devices (8x8 LED display).
7+
8+
## Design
9+
10+
TBU

0 commit comments

Comments
 (0)