Skip to content

Commit

Permalink
Initial release (v0.1.0)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <a.jung@lancs.ac.uk>
  • Loading branch information
nderjung committed Aug 23, 2021
1 parent 68f1083 commit 94b76b5
Show file tree
Hide file tree
Showing 24 changed files with 1,332 additions and 38 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: 'release'

on:
push:
pull_request:
types: [ opened, reopened ]

jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v1
with:
go-version: '1.14.x'

- uses: actions/checkout@v1

- name: Install tooling
run: |
make ci-install-ci-tools
- name: Cache go dependencies
id: package-cache-go-dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-prod-

- name: Install dependencies
if: steps.package-cache-go-dependencies.outputs.cache-hit != 'true'
run: make

- name: Build snapshot artifacts
run: make ci-build-snapshot-packages

- uses: actions/upload-artifact@master
with:
name: artifacts
path: dist


test-linux-artifacts:
needs: [ build-artifacts ]
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@master

- uses: actions/download-artifact@master
with:
name: artifacts
path: dist

- name: Test linux run
run: make ci-test-linux-run

- name: Test DEB package installation
run: make ci-test-deb-package-install

- name: Test RPM package installation
run: make ci-test-rpm-package-install

release:
needs: [ build-artifacts, test-linux-artifacts ]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:

- uses: actions/setup-go@v1
with:
go-version: '1.14.x'

- uses: actions/checkout@v1

- name: Install tooling
run: make ci-install-ci-tools

- name: Cache go dependencies
id: release-cache-go-dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-prod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-prod-

- name: Install dependencies
if: steps.release-cache-go-dependencies.outputs.cache-hit != 'true'
run: make

- name: Publish GitHub release
run: make ci-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dist/
go.sum
24 changes: 24 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
release:
prerelease: false

builds:
- binary: wayfinder
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.

archives:
- format: tar.gz

nfpms:
- license: BSD-3-Clause
maintainer: Alexander Jung
homepage: https://github.com/lancs-net/wayfinder/
description: "wayfinder: OS Configuration Micro-Benchmarking Framework"
formats:
- rpm
- deb
65 changes: 65 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cff-version: 1.2.0
title: "wayfinder: OS Configuration Micro-Benchmarking Framework"
message: "If you use this software, please cite it as below."
authors:
- family-names: "Jung"
given-names: "Alexander"
orcid: "https://orcid.org/0000-0002-8139-2864"
version: 0.1.0
date-released: 2021-08-25
url: "https://github.com/lancs-net/wayfinder"
license: BSD-3-Clause
preferred-citation:
title: "Wayfinder: Towards Automatically Deriving Optimal OS Configurations"
authors:
- family-names: "Jung"
given-names: "Alexander"
affiliation: "Lancaster University"
city: "Lancaster"
country: "UK"
orcid: "https://orcid.org/0000-0002-8139-2864"
- family-names: "Lefeuvre"
given-names: "Hugo"
affiliation: "The University of Manchester"
city: "Manchester"
country: "UK"
orcid: "https://orcid.org/0000-0001-9547-7458"
- family-names: "Rotsos"
given-names: "Charalampos"
affiliation: "Lancaster University"
city: "Lancaster"
country: "UK"
orcid: "https://orcid.org/0000-0003-0252-9373"
- family-names: "Olivier"
given-names: "Pierre"
affiliation: "The University of Manchester"
city: "Manchester"
country: "UK"
- family-names: "Oñoro-Rubio"
given-names: "Daniel"
affiliation: "NEC Laboratories Europe GmbH"
city: "Heidelberg"
country: "DE"
- family-names: "Niepert"
given-names: "Mathias"
affiliation: "NEC Laboratories Europe GmbH"
city: "Heidelberg"
country: "DE"
- family-names: "Huici"
given-names: "Felipe"
affiliation: "NEC Laboratories Europe GmbH"
city: "Heidelberg"
country: "DE"
doi: 10.1145/3476886.3477506
isbn: 978-1-4503-8698-2/21/08
type: conference-paper
conference:
name: "12th ACM SIGOPS Asia-Pacific Workshop on Systems (APSys'21)"
date-end: "2021-08-24"
date-start: "2021-08-25"
publisher: Association for Computing Machinery
start: 115
end: 122
pages: 8
month: 8
year: 2021
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG GO_VERSION=1.14
FROM golang:${GO_VERSION}-stretch AS base

ARG ORG=lancs-net
ARG BIN=ukbench
ARG BIN=wayfinder

RUN set -xe; \
apt-get update; \
Expand Down
32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# License

SPDX-License-Identifier: BSD-3-Clause

Authors: Alexander Jung <a.jung@lancs.ac.uk>

Copyright (c) 2020, Lancaster University. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
55 changes: 54 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ INSTALLDIR ?= /usr/local/bin/
# Arguments
REGISTRY ?= ghcr.io
ORG ?= lancs-net
BIN ?= ukbench
BIN ?= wayfinder
IMAGE_TAG ?= latest
IMAGE ?= $(REGISTRY)/$(ORG)/$(BIN):$(IMAGE_TAG)

Expand Down Expand Up @@ -122,3 +122,56 @@ container:
devenv: DOCKER_RUN_EXTRA ?= -it --name $(BIN)-devenv
devenv:
$(Q)$(call DOCKER_RUN,$(DOCKER_RUN_EXTRA),bash)


# For CI
.PHONY: ci-install-ci-tools
ci-install-ci-tools:
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- -b /usr/local/bin/ "v0.146.0"


.PHONY: ci-publish-release
ci-publish-release:
goreleaser --rm-dist

.PHONY: ci-build-snapshot-packages
ci-build-snapshot-packages:
goreleaser \
--snapshot \
--skip-publish \
--rm-dist

.PHONY: ci-release
ci-release:
goreleaser release --rm-dist


.PHONY: ci-test-deb-package-install
ci-test-deb-package-install:
docker run \
-v //var/run/docker.sock://var/run/docker.sock \
-v /${PWD}://src \
-w //src \
ubuntu:latest \
/bin/bash -x -c "\
apt update && \
apt install ./dist/$(BIN)_*_linux_amd64.deb -y && \
$(BIN) version \
"

.PHONY: ci-test-rpm-package-install
ci-test-rpm-package-install:
docker run \
-v //var/run/docker.sock://var/run/docker.sock \
-v /${PWD}://src \
-w //src \
fedora:latest \
/bin/bash -x -c "\
dnf install ./dist/$(BIN)_*_linux_amd64.rpm -y && \
$(BIN) version \
"

.PHONY: ci-test-linux-run
ci-test-linux-run:
chmod 755 ./dist/$(BIN)_linux_amd64/$(BIN) && \
./dist/$(BIN)_linux_amd64/$(BIN) version
Loading

0 comments on commit 94b76b5

Please sign in to comment.