Skip to content
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
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Toolchain

on:
push:
branches: [ "master" ]
tags: [ "*" ]
pull_request:
branches: [ "master" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
branches: [ "master" ]
branches: [ "master", "main"]

We should rename this to main while you're tinkering

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to address that separately, and through all the osquery repos when we do it.

workflow_dispatch:

jobs:
build:
permissions:
contents: write
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1

- name: Set Version
run: echo "VERSION=$(git describe --tags --always --dirty)-$(uname -m)" >> "$GITHUB_ENV"

- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install help2man libtool-bin libncurses-dev ninja-build texinfo xz-utils gawk -y

- name: Build
run: ./build.sh "/opt/osquery-toolchain"

- name: Archive
run: |
cd /opt/osquery-toolchain/final
mv sysroot osquery-toolchain
tar -pcvJf osquery-toolchain-${VERSION}.tar.xz osquery-toolchain

- name: Upload Artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
with:
name: osquery-toolchain-${{ env.VERSION }}
path: /opt/osquery-toolchain/final/osquery-toolchain-${{ env.VERSION }}.tar.xz

- name: Upload Release Asset
if: ${{ github.ref_type == 'tag' }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload "${GITHUB_REF_NAME}" \
"/opt/osquery-toolchain/final/osquery-toolchain-${VERSION}.tar.xz" \
--repo "${GITHUB_REPOSITORY}"

2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TUPLE=$MACHINE-osquery-linux-gnu

ZLIB_VER="1.2.13"
ZLIB_URL="https://zlib.net/zlib-${ZLIB_VER}.tar.gz"
ZLIB_URL="https://zlib.net/fossils/zlib-${ZLIB_VER}.tar.gz"
ZLIB_SHA="b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"

LLVM_VERSION="11.0.0"
Expand Down
2 changes: 1 addition & 1 deletion crosstool-ng-config-aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ CT_LOG_EXTRA=y
# CT_LOG_DEBUG is not set
CT_LOG_LEVEL_MAX="EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_PROGRESS_BAR=y
CT_LOG_PROGRESS_BAR=n
# CT_LOG_TO_FILE is not set

#
Expand Down
2 changes: 1 addition & 1 deletion crosstool-ng-config-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CT_LOG_EXTRA=y
# CT_LOG_DEBUG is not set
CT_LOG_LEVEL_MAX="EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_PROGRESS_BAR=y
CT_LOG_PROGRESS_BAR=n
# CT_LOG_TO_FILE is not set

#
Expand Down