Skip to content

Commit

Permalink
feat: CI (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
0-Sacha authored Nov 26, 2024
1 parent 5f8d6cc commit ac8d8eb
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/arm-none-eabi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: arm-none-eabi

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
windows-latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- name: Build HelloWorld
run: bazelisk build //HelloWorld:HelloWorld
working-directory: Examples

ubuntu-latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- name: Build HelloWorld
run: bazelisk build //HelloWorld:HelloWorld
working-directory: Examples
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bazel-bin
bazel-examples
bazel-bazel_arm
bazel-out
bazel-testlogs
11 changes: 11 additions & 0 deletions Examples/HelloWorld/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
"""

load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "HelloWorld",
srcs = [ "main.cpp" ],
copts = [ "-std=c++20" ],
visibility = ["//visibility:public"],
)
6 changes: 6 additions & 0 deletions Examples/HelloWorld/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <iostream>

int main() {
std::cout << "Hello World!";
return 0;
}
16 changes: 16 additions & 0 deletions Examples/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
""

# buildifier: disable=module-docstring
module(
name = "bazel_arm_examples",
version = "0.1",
)

bazel_dep(name = "rules_cc", version = "0.0.10")
bazel_dep(name = "platforms", version = "0.0.10")

git_override(module_name="bazel_utilities", remote="https://github.com/0-Sacha/bazel_utilities.git", commit="aa399bb2599e2cd64a35a2275ce0f73a539524a5")
bazel_dep(name = "bazel_utilities", version = "0.0.1", dev_dependency = True)
local_path_override(module_name = "bazel_arm", path = "../")
bazel_dep(name = "bazel_arm", version = "0.0.1", dev_dependency = True)

118 changes: 118 additions & 0 deletions Examples/MODULE.bazel.lock

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

0 comments on commit ac8d8eb

Please sign in to comment.