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

v1.0 Release #1

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cd654c7
Add gitflow
BSFishy Feb 27, 2020
c5acc9c
Add some tools
BSFishy Feb 27, 2020
065cc18
Remove qemu version
BSFishy Feb 27, 2020
e63b596
Fix Gitpod
BSFishy Feb 27, 2020
f32c3e6
Add back libvirt package
BSFishy Feb 27, 2020
b18efb9
Try to fix packages
BSFishy Feb 27, 2020
bd12eee
Remove bundle install
BSFishy Feb 27, 2020
861d00e
Add libvirt packages
BSFishy Feb 27, 2020
1391bc7
Try to fix packages
BSFishy Feb 27, 2020
1ccdb81
Remove xslt version
BSFishy Feb 27, 2020
35675af
Remove package
BSFishy Feb 27, 2020
85730bb
Some work on Vagrant
BSFishy Feb 28, 2020
e00f94a
More vagrant
BSFishy Feb 28, 2020
fbc2301
Even more vagrant
BSFishy Feb 28, 2020
f14e7e8
Add xslt version
BSFishy Feb 28, 2020
52b685b
Add qemu-utils
BSFishy Feb 28, 2020
af5a30a
Merge branch 'develop' of https://github.com/bitmodo/assertions into …
BSFishy Feb 28, 2020
9d768a7
Add start command
BSFishy Feb 28, 2020
fb93a24
Fix dependencies
BSFishy Feb 28, 2020
c0a94bb
Fix kvm versions
BSFishy Feb 28, 2020
a596374
Remove unneeded package
BSFishy Feb 28, 2020
e64fff4
Remove service start
BSFishy Feb 28, 2020
aa19b20
Remove Vagrant dependencies
BSFishy Mar 2, 2020
0a76122
Add bundle install
BSFishy Mar 2, 2020
6f9114e
Fix bundler
BSFishy Mar 2, 2020
3d36396
Add some changes to actions
BSFishy Mar 2, 2020
cc87545
Fix danger workflow
BSFishy Mar 2, 2020
6be2b04
Test Danger action
BSFishy Mar 2, 2020
5efebcd
Install ruby
BSFishy Mar 2, 2020
998c2cf
Install Danger
BSFishy Mar 2, 2020
8d4e809
Use old config
BSFishy Mar 2, 2020
cd74f05
Add API Token
BSFishy Mar 2, 2020
f6893b6
Add version
BSFishy Mar 2, 2020
bf1670a
Add verbose
BSFishy Mar 2, 2020
bce4d2a
Changes to actions
BSFishy Mar 2, 2020
a2329b4
Fix clang tidy
BSFishy Mar 2, 2020
7bea8e3
Update Dangerfile
BSFishy Mar 2, 2020
b24f1b2
Change bot token
BSFishy Mar 3, 2020
c224cfa
Fix ruby version
BSFishy Mar 3, 2020
5710789
Test
BSFishy Mar 3, 2020
66607b9
Small changes to Dangerfile
BSFishy Mar 3, 2020
ddc8326
Add semantic-release
BSFishy Mar 3, 2020
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
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ CheckOptions:
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-magic-numbers.IgnoredIntegerValues
value: {1, 2, 3, 4, 5, 6, 7, 8, 9}
value: 1;2;3;4;5;6;7;8;9;
22 changes: 22 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pull Actions

on: [pull_request, pull_request_review, pull_request_review_comment]

jobs:
danger:
name: Danger Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Setup environment
run: |
gem install bundler -v 2.1.4
bundle install --jobs 4 --retry 3
- name: Run Danger
run: |
export DANGER_GITHUB_API_TOKEN=${{ secrets.BOT_TOKEN }}
bundle exec danger --verbose
19 changes: 18 additions & 1 deletion .github/workflows/build.yml → .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build & test CI
name: Push Actions

on: [push]

jobs:
build:
name: CI Build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand Down Expand Up @@ -46,7 +47,9 @@ jobs:
run: ninja -C build
- name: Test
run: ninja -C build test

minify:
name: File Minify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -58,3 +61,17 @@ jobs:
with:
name: Minified artifacts
path: artifacts

semver:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ build/
cmake-*/
vgcore.*
core.*
.vagrant/
.bundle/
40 changes: 35 additions & 5 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM gitpod/workspace-full:build-branch-master

USER root

# Install packages
# Install system packages
RUN apt-get update \
&& apt-get install -yq --no-install-recommends \
python3=3.7.3-1 \
Expand All @@ -11,10 +11,40 @@ RUN apt-get update \
python3-wheel=0.32.3-2 \
valgrind=1:3.14.0-2ubuntu6 \
ccache=3.6-1 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* \
&& /usr/sbin/update-ccache-symlinks
&& /usr/sbin/update-ccache-symlinks \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

# Disable Vagrant stuff for now. When VM's are supported, this will be uncommented.
# # Install libvirt packages
# RUN apt-get update \
# && apt-get install -yq --no-install-recommends \
# ruby-libvirt=0.7.1-1 \
# && apt-get install -yq --no-install-recommends \
# qemu=1:3.1+dfsg-2ubuntu3.7 \
# qemu-kvm=1:3.1+dfsg-2ubuntu3.7 \
# qemu-utils=1:3.1+dfsg-2ubuntu3.7 \
# libvirt-daemon-system=5.0.0-1ubuntu2.6 \
# libvirt-clients=5.0.0-1ubuntu2.6 \
# ebtables=2.0.10.4+snapshot20181205-1ubuntu1 \
# dnsmasq-base=2.80-1ubuntu1 \
# && apt-get install -yq --no-install-recommends \
# libxslt1-dev=1.1.32-2ubuntu0.2 \
# libxml2-dev=2.9.4+dfsg1-7ubuntu3 \
# libvirt-dev=5.0.0-1ubuntu2.6 \
# zlib1g-dev=1:1.2.11.dfsg-1ubuntu2 \
# ruby-dev=1:2.5.1 \
# && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

# # Download and install Vagrant
# RUN curl -O https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
# && apt install ./vagrant_2.2.7_x86_64.deb \
# && usermod -a -G libvirt gitpod \
# && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

USER gitpod

# Install pip packages
RUN python3 -m pip install pip==20.0.2 meson==0.53.0 gcovr==4.2 ninja==1.9.0.post1
# Install packages
RUN python3 -m pip install pip==20.0.2 meson==0.53.0 gcovr==4.2 ninja==1.9.0.post1 \
&& brew install git-flow
# && bundle install
# && vagrant plugin install vagrant-libvirt
8 changes: 7 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
tasks:
- init:
bundle install --jobs 4 --retry 3
image:
file: .gitpod.Dockerfile
vscode:
extensions:
- [email protected]:sYg01j3Mm+6RJtaIRwyR5A==
- [email protected]:Pq/tmf2WN3SanVzB4xZc1g==
- [email protected]:e2ktoGsnar8weYYRNdvexg==
# - [email protected]:VakXVw0C77hAQ3U3AZTn1Q==
# - [email protected]:RN+gv0dPjYfMqlcEEralhg==
- [email protected]:cGUzsroSPSoihE2Yps+qbA==
9 changes: 9 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
branches:
- master
- name: 'release?(/*)'
prerelease: true

plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator'
- '@semantic-release/github'
45 changes: 45 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Check if the Dangerfile was changed
has_dangerfile_changes = git.modified_files.include? "Dangerfile"
# Check if the Gemfile was changed
has_gemfile_changes = git.modified_files.include? "Gemfile"
# Check if the license file was changed
has_license_changes = git.modified_files.include? "UNLICENSE"
# Check if the header was changed
has_app_changes = git.modified_files.include? "assertions.h"
# Check if any of the tests were changed
has_test_changes = !git.modified_files.grep(/test/).empty?
# Check if the PR is trivial
declared_trivial = (github.pr_title + github.pr_body).include?("#trivial") || !has_app_changes

# Allow Bitmodo members to bypass some checks
unless github.api.organization_member?('bitmodo', github.pr_author)
# Fail if the PR does not provide a description
failure "Please provide a summary in the Pull Request description" if github.pr_body.length < 5

# Fail if the license was modified by an external user
failure "The license has been modified" if has_license_changes

# Warn if the Dangerfile was changed by an external contributor
warn "#{github.html_link("Dangerfile")} has been modified by external contributor" if has_dangerfile_changes

# Warn if the Gemfile was changed by an external contributor
warn "#{github.html_link("Gemfile")} has been modified by external contributor" if has_gemfile_changes

# Provide a thanks message if the user is external
message ":+1: Thank you for contributing!"
else
# Warn if the license has been modified
warn "The license has been modified" if has_license_changes

# Provide a message if the user is internal
message ":ok_hand:"
end

# Warn if the header has changed but the tests have not
warn "Tests have not been updated" if has_app_changes && !has_test_changes && !declared_trivial
# Create a warning if the PR is a work in progress
warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]"
# Warn if the PR is not assigned to anyone
warn "This PR does not have any assignees yet." unless github.pr_json["assignee"]
# Warn if the PR is not mergeable
warn "This PR cannot be merged yet" unless github.pr_json["mergeable"]
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem 'danger', '6.3.0'
59 changes: 59 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
claide (1.0.3)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
colored2 (3.1.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (6.3.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 2.0)
git (~> 1.6)
kramdown (~> 2.0)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0)
faraday (~> 0.8)
git (1.6.0)
rchardet (~> 1.8)
kramdown (2.1.0)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
multipart-post (2.1.1)
nap (1.1.0)
no_proxy_fix (0.1.2)
octokit (4.16.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
public_suffix (4.0.3)
rchardet (1.8.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.6.1)

PLATFORMS
ruby

DEPENDENCIES
danger (= 6.3.0)

BUNDLED WITH
2.1.4
24 changes: 24 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Vagrant.configure("2") do |config|
# Use Ubuntu 19.04 as the default box
config.vm.box = "generic/ubuntu1904"
config.vm.box_version = "2.0.6"

config.vm.provider :libvirt do |libvirt|
# Use QEMU session instead of system connection
libvirt.qemu_use_session = true
# URI of QEMU session connection, default is as below
libvirt.uri = 'qemu:///session'
# URI of QEMU system connection, use to obtain IP address for management, default is below
libvirt.system_uri = 'qemu:///system'
# Path to store Libvirt images for the virtual machine, default is as ~/.local/share/libvirt/images
libvirt.storage_pool_path = '/home/gitpod/.local/share/libvirt/images'
# Management network device, default is below
libvirt.management_network_device = 'virbr0'
end

# Public network configuration using existing network device
# Note: Private networks do not work with QEMU session enabled as root access is required to create new network devices
config.vm.network :public_network, :dev => "virbr1",
:mode => "bridge",
:type => "bridge"
end
4 changes: 2 additions & 2 deletions assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* apart from variadic utility macros.
*/

#ifndef _ASSERTIONS_H
#define _ASSERTIONS_H
#ifndef ASSERTIONS_H
#define ASSERTIONS_H

#include <stdlib.h>
#include <stdio.h>
Expand Down