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

ci: move linux and macos to Github Actions #5087

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 1 addition & 35 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO move to Github Actions after https://github.com/actions/runner/issues/385
freebsd_task:
freebsd_instance:
image_family: freebsd-13-2
Expand All @@ -13,38 +14,3 @@ freebsd_task:
test_script: gmake -j4 test
env:
LC_ALL: en_US.UTF-8

linux_task:
locales_script:
- apt-get update && apt-get -y install locales
- echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
- locale-gen en_US.UTF-8
matrix:
- name: linux_clang
container:
image: silkeh/clang:13
env:
CXX: clang++
- name: linux_gcc
container:
image: gcc:10
test_script: make -j4 test
env:
LC_ALL: en_US.UTF-8

macos_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
matrix:
- name: macos_clang
clang_script: brew install llvm@13
env:
CXX: /opt/homebrew/opt/llvm@13/bin/clang++
- name: macos_gcc
gcc_script:
- /usr/sbin/softwareupdate --install-rosetta --agree-to-license
- arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- arch -x86_64 /usr/local/bin/brew install gcc@10
env:
CXX: g++-10
test_script: make -j4 test
51 changes: 51 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Makefile CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
os: [ubuntu, macos]
toolchain: [gcc, llvm]
include:
- os: ubuntu
toolchain: gcc
install_cmd: |
sudo apt update
sudo apt install g++
CXX: g++
- os: ubuntu
toolchain: llvm
install_cmd: |
sudo apt update
sudo apt install clang
CXX: clang++
- os: macos
toolchain: gcc
install_cmd: |
brew update
brew install gcc
CXX: g++
- os: macos
toolchain: llvm
install_cmd: |
brew update
brew install llvm
CXX: clang++

runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3

# TODO remove after https://github.com/actions/runner-images/issues/8659 is resolved
- uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.os }}-latest

- name: Install dependencies
run: ${{ matrix.install_cmd }}
- name: Build and test
run: make CXX=${{ matrix.CXX }} -j4 test