Skip to content

Commit

Permalink
WIP: inital import
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Aug 24, 2023
0 parents commit 12015c6
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/actions/setup-xcc/action.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -eu -x

RELEASE=https://github.com/kentik/musl-xcc/releases/download/$VERSION/
ARCHIVE=xcc-$TARGET.tar.gz

curl -L $RELEASE/$ARCHIVE | tar -xzf - -C /

echo "CC=/opt/xcc/bin/$TARGET-gcc" >> $GITHUB_ENV
echo "CXX=/opt/xcc/bin/$TARGET-g++" >> $GITHUB_ENV
echo "AR=/opt/xcc/bin/$TARGET-ar" >> $GITHUB_ENV
echo "LD=/opt/xcc/bin/$TARGET-ld" >> $GITHUB_ENV
echo "RANLIB=/opt/xcc/bin/$TARGET-ranlib" >> $GITHUB_ENV
16 changes: 16 additions & 0 deletions .github/actions/setup-xcc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: package

inputs:
target:
required: true
version:
required: true

runs:
using: composite
steps:
- run: $GITHUB_ACTION_PATH/action.sh
shell: bash
env:
TARGET: ${{ inputs.target }}
VERSION: ${{ inputs.version }}
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: build

on:
push:
branches: "*"

jobs:
build:
strategy:
matrix:
target:
- x86_64-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: ./.github/actions/setup-xcc
with:
target: ${{ matrix.target }}
version: f9cb5162
- run: |
make -C libpcap
ls -lR
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libpcap"]
path = libpcap
url = https://github.com/the-tcpdump-group/libpcap.git
1 change: 1 addition & 0 deletions libpcap
Submodule libpcap added at 371b9e

0 comments on commit 12015c6

Please sign in to comment.