Check the helper_ and on_ fn order and usage #351
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: push | |
jobs: | |
build-ubuntu-clang: | |
name: ubuntu-clang | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Run the tests | |
run: ./tests.sh | |
build-ubuntu-clang-asan: | |
name: ubuntu-clang-asan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Run the tests | |
run: ./tests.sh | |
env: | |
ASAN: 1 | |
build-ubuntu-clang-valgrind: | |
name: ubuntu-clang-valgrind | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Install valgrind | |
run: sudo apt install valgrind | |
- name: Run the tests | |
run: ./tests.sh | |
env: | |
VALGRIND: 1 | |
build-ubuntu-gcc: | |
name: ubuntu-gcc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Run the tests | |
run: ./tests.sh | |
env: | |
CC: gcc | |
build-ubuntu-gcc-asan: | |
name: ubuntu-gcc-asan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Run the tests | |
run: ./tests.sh | |
env: | |
CC: gcc | |
ASAN: 1 | |
build-ubuntu-gcc-valgrind: | |
name: ubuntu-gcc-valgrind | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clone the grug submodule | |
run: git submodule update --init | |
- name: Install nasm | |
run: sudo apt install nasm | |
- name: Install valgrind | |
run: sudo apt install valgrind | |
- name: Run the tests | |
run: ./tests.sh | |
env: | |
CC: gcc | |
VALGRIND: 1 | |
# TODO: This is supposed to emulate Android, but I'm not sure whether it's working, | |
# since the `script: lsb_release -a && uname -a` prints Ubuntu 22.04, | |
# which seems like the job container's linux version, so not the Android version | |
# This code is the first snippet from the "Usage & Examples" section here: | |
# https://github.com/marketplace/actions/android-emulator-runner | |
# test: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: checkout | |
# uses: actions/checkout@v4 | |
# - name: Enable KVM | |
# run: | | |
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
# sudo udevadm control --reload-rules | |
# sudo udevadm trigger --name-match=kvm | |
# - name: run tests | |
# uses: reactivecircus/android-emulator-runner@v2 | |
# with: | |
# api-level: 29 | |
# script: lsb_release -a && uname -a | |
# TODO: REMOVE! | |
# build-foo-clang: | |
# name: foo-clang | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Print clang version | |
# run: clang --version | |
# - name: Build | |
# run: clang foo.c -o foo -Wfatal-errors | |
# - name: Run | |
# run: ./foo | |
# TODO: REMOVE! | |
# build-foo-gcc: | |
# name: foo-gcc | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Build | |
# # `gcc` is a nasty symlink to clang, so we use the absolute path of gcc here | |
# run: /opt/homebrew/Cellar/gcc/14.2.0/bin/gcc-14 foo.c -o foo -Wfatal-errors -Wno-pragmas | |
# - name: Run | |
# run: ./foo | |
# Use this to test ARM support in grug.c: | |
# build-mac-clang-arm: | |
# name: mac-clang-arm | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# # TODO: Put this back! | |
# # - name: Clone the grug submodule | |
# # run: git submodule update --init | |
# - name: Add leading underscore to labels, because dlsym() on Macho-O can't load symbols without them | |
# # For some godforsaken reason `+` nor `\+` here works with sed, but `*` does. | |
# # I haven't been able to figure out why. | |
# # See these links for more cursed information about our version of sed: | |
# # https://stackoverflow.com/a/23146221/13279557 | |
# # https://stackoverflow.com/a/12180129/13279557 | |
# # https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04 | |
# # https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions | |
# run: sed -i -E "s/^\([[:alnum:]_]*\):/_\1:/" demo_arm64.s && | |
# sed -i -E "s/^\.global \([[:alnum:]_]*\)/.global _\1/" demo_arm64.s && | |
# sed -i -E "s/^\.extern \([[:alnum:]_]*\)/.extern _\1/" demo_arm64.s | |
# - name: cat demo_arm64.s | |
# run: cat demo_arm64.s | |
# - name: Assemble demo_arm64.s | |
# run: clang demo_arm64.s -o demo_arm64.dylib -shared | |
# - name: Compile demo_arm64_main.c | |
# # -rdynamic allows demo_arm64.dylib to call functions from demo_arm64_main.c | |
# run: clang demo_arm64_main.c -o demo_arm64_main -g -fsanitize=address,undefined -rdynamic | |
# - name: Run demo_arm64_main | |
# run: ./demo_arm64_main | |
# # TODO: Put this back! | |
# # - name: Run the tests | |
# # run: ./tests.sh | |
# build-mac-clang-asan: | |
# name: mac-clang-asan | |
# runs-on: macos-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# TODO: Copy what goes here from the mac-clang job | |
# - name: Run the tests | |
# run: ./tests.sh | |
# env: | |
# ASAN: 1 | |
# TODO: Add linux-arm64 once it is public to open-source projects: | |
# https://github.com/orgs/community/discussions/19197#discussioncomment-10550689 | |
# https://github.com/github/roadmap/issues/960 | |
# build-linux-clang-arm64: | |
# name: linux-clang-arm64 | |
# runs-on: linux-arm64 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Hello, ARM! | |
# run: echo "Hello, ARM!" |