-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from symplely/master
Added Github Actions CI
- Loading branch information
Showing
20 changed files
with
275 additions
and
105 deletions.
There are no files selected for viewing
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
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 |
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
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 |
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
Oops, something went wrong.