Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Github Actions CI #2

Merged
merged 39 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d080622
update CMakeLists.txt
TheTechsTech Jun 1, 2023
a08195e
update task.c, ucontext.c and ucontext.h
TheTechsTech Jun 2, 2023
afff64a
bug fixes for Windows cmake build
TheTechsTech Jun 3, 2023
ca35bb7
update CMakeLists.txt, cl_32.bat, cl_64.bat and task.c
TheTechsTech Jun 6, 2023
8e654a1
update README.md - some styling fixes
TheTechsTech Jun 6, 2023
1771729
updates - add Windows cmake build instructions
TheTechsTech Jun 6, 2023
fb9ce61
ci: create ci.yml
TheTechsTech Jun 7, 2023
0202137
ci: update ci.yml
TheTechsTech Jun 7, 2023
12bc104
ci: update ci.yml
TheTechsTech Jun 7, 2023
dd2b14a
ci: update ci and add
TheTechsTech Jun 7, 2023
e424aa7
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
a613bee
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
a1bf758
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
fb2f845
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
b4ab678
corrections, bug fix arm build, move mips-ucontext
TheTechsTech Jun 7, 2023
ba23f49
Update taskimpl.h
TheTechsTech Jun 7, 2023
f564ef2
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
f10b250
update ci_qemu.yml and CMakeLists.txt
TheTechsTech Jun 7, 2023
b067916
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
a07489a
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
5d8a4c5
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
612afe0
ci: update ci_qemu.yml
TheTechsTech Jun 7, 2023
3cca83c
update CMakeLists.txt
TheTechsTech Jun 7, 2023
bd350f7
update CMakeLists.txt
TheTechsTech Jun 7, 2023
8d3f98e
revert ci_qemu.yml and CMakeLists.txt
TheTechsTech Jun 8, 2023
96a7ef0
update context.c and taskimpl.h
TheTechsTech Jun 8, 2023
6c97769
update arm-ucontext.h
TheTechsTech Jun 8, 2023
8d4165d
update arm-ucontext.h, context.c and taskimpl.h
TheTechsTech Jun 8, 2023
a773dda
update taskimpl.h
TheTechsTech Jun 8, 2023
26c80d3
update context.c and taskimpl.h
TheTechsTech Jun 8, 2023
b876ac5
update
TheTechsTech Jun 8, 2023
cb71e4e
ci: update ci_qemu.yml
TheTechsTech Jun 8, 2023
a6e1e36
Update ci_qemu.yml
TheTechsTech Jun 8, 2023
280a06c
ci: update ci.yml and ci_qemu.yml
TheTechsTech Jun 8, 2023
7d85270
skip building for armv7 not linking examples
TheTechsTech Jun 9, 2023
745660c
Merge branch 'master' of https://github.com/symplely/libtask
TheTechsTech Jun 9, 2023
84c57b7
ci: update ci_qemu.yml
TheTechsTech Jun 9, 2023
74a1b41
revert/restore skip building for armv7 not linking examples
TheTechsTech Jun 10, 2023
a1fe2df
skip delay polling Windows, not working correctly
TheTechsTech Jun 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: windows & linux

on: [push, pull_request]

jobs:
build:
name: ${{ matrix.target }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- target: amd64
flags: -O3 -fomit-frame-pointer
- target: x86
flags: -m32 -O3 -fomit-frame-pointer
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -q -y
sudo apt-get install -y gcc-multilib g++-multilib valgrind libc6-dbg libc6-dbg:i386
- name: cmake build & test example
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd bin
./chan_3
./primes
./testdelay 2

build-windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch: [amd64, x86]
steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: actions/checkout@v3
- name: cmake build & test examples
run: |
mkdir build
cd build
cmake .. -D CMAKE_GENERATOR_PLATFORM=Win32
cmake --build .
cd bin/Debug
.\chan_1.exe
.\chan_2.exe
.\chan_3.exe
.\primes.exe
.\testdelay.exe 2
42 changes: 42 additions & 0 deletions .github/workflows/ci_qemu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: arch64 & others by qemu

on: [push, pull_request]

jobs:
build-qemu:
name: ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: aarch64
arch: aarch64
- target: ppc64v2
arch: ppc64le
- target: riscv64
arch: riscv64
- target: s390x
arch: s390x
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ubuntu_latest
install: |
apt-get update -q -y
apt-get install -q -y --no-install-recommends cmake build-essential
env: |
# Valgrind on arm will fail if the stack size is larger than 8MB.
# Set QEMUs stack size to 8MB since Github runners use 16MB default.
QEMU_STACK_SIZE: 8388608
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd bin
./chan_3
./primes
./testdelay 2
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ cmake_minimum_required(VERSION 3.10)

project(LIBTASK C)

set(C_STANDARD 99)
set(C_STANDARD 89)

# -g for debugging
set(CMAKE_C_FLAGS "-g")
if(UNIX)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer ")
endif()

message("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")

set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BUILD_DIR}/bin)
Expand All @@ -17,10 +21,9 @@ file(GLOB lib_files
)
add_library(task STATIC ${lib_files})

set(TARGET_LIST primes tcpproxy helloworld chan_1 chan_2 chan_3)
set(TARGET_LIST testdelay primes helloworld chan_1 chan_2 chan_3)
foreach (TARGET ${TARGET_LIST})
add_executable(${TARGET} examples/${TARGET}.c)
target_include_directories(${TARGET} PRIVATE src)
target_link_libraries(${TARGET} task)
endforeach()
libtask
Loading