-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e27451d
Showing
24 changed files
with
3,851 additions
and
0 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,13 @@ | ||
name: Security Audit | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
audit: | ||
name: Audit | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,122 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache target | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
components: clippy, rustfmt | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
|
||
- name: Clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
|
||
- name: Format | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Doc Generation | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --all-features | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache target | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
components: clippy | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
|
||
- name: Build debug binary | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
|
||
- name: Build release binary | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache target | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
components: clippy | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
|
||
- name: Test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features -- --test-threads=1 |
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,91 @@ | ||
name: Release | ||
|
||
# Push events to matching v*, i.e. v1.0, v20.15.10 | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
check: | ||
timeout-minutes: 30 | ||
name: Check Signed Tag | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
stringver: ${{ steps.contentrel.outputs.stringver }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
path: src/github.com/auxon/modality-ctf-plugins | ||
|
||
- name: Check signature | ||
run: | | ||
RELEASE_TAG=${{ github.ref }} | ||
RELEASE_TAG="${RELEASE_TAG#refs/tags/}" | ||
TAGCHECK=$(git tag -v ${RELEASE_TAG} 2>&1 >/dev/null) || | ||
echo "${TAGCHECK}" | grep -q "error" && { | ||
echo "::error::tag ${RELEASE_TAG} is not a signed tag. Failing release process." | ||
exit 1 | ||
} || { | ||
echo "Tag ${RELEASE_TAG} is signed." | ||
exit 0 | ||
} | ||
working-directory: src/github.com/auxon/modality-ctf-plugins | ||
|
||
package: | ||
name: Build Release Package | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-20.04 | ||
needs: [check] | ||
steps: | ||
- name: Print version | ||
run: | | ||
RELEASE_TAG=${{ github.ref }} | ||
RELEASE_TAG="${RELEASE_TAG#refs/tags/}" | ||
RELEASE_VERSION="${RELEASE_TAG#v}" | ||
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV | ||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | ||
echo "Release tag: $RELEASE_TAG" | ||
echo "Release version: $RELEASE_VERSION" | ||
- name: Install system packages | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y flex bison m4 gettext autotools-dev build-essential libglib2.0-dev | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Fetch dependencies | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fetch | ||
|
||
- name: Build release binaries | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
|
||
- name: Create github release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: true | ||
prerelease: false | ||
name: Release ${{ env.RELEASE_VERSION }} | ||
files: | | ||
target/release/modality-ctf-import | ||
target/release/modality-lttng-live-collector |
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 @@ | ||
/target |
Oops, something went wrong.