-
Notifications
You must be signed in to change notification settings - Fork 2
Ian/cxx common action #14
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
Draft
2over12
wants to merge
35
commits into
master
Choose a base branch
from
ian/cxx-common-action
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ad4cf36
look for files that are executable
Ninja3047 d37be4e
use yes for gpg
Ninja3047 d129548
fix typo
Ninja3047 263e6b6
add langid overrides to options
2over12 401fe03
fix order of init
2over12 6dd89b4
initialize ghidra script compilation cache
Ninja3047 06363f1
fix typo
Ninja3047 6d4732f
use abstract class
Ninja3047 734826c
fix python lints
Ninja3047 e11f9e5
fix missing comma
Ninja3047 c114ae6
skip hidden files
Ninja3047 2f5ae38
make time outs pass for now
2over12 f0e090d
add FixGlobalRegisters as a postScript (#11)
Ninja3047 da20621
fix missing comma
Ninja3047 3bf1ea3
add enable opt flag
2over12 07ff241
add draft action
2over12 b4720f9
remove stale dep
2over12 f4d5351
fix runner
2over12 6f96d98
secrets input
2over12 542e1ac
add creds for image back
2over12 896ddfc
fix ref
2over12 2d4c9d2
working dir
2over12 5b1fc10
reuse initilization code
2over12 ef4c803
add token
2over12 68207f3
actually install, probably need this to be an input?
2over12 2fb5858
add use cache env var
2over12 5e88d8d
add more flags
2over12 ee82839
fix quotes
2over12 97aca57
is it supposed to parse like this
2over12 45a8c0c
try in single shell
2over12 97babea
add debug
2over12 8bdb913
try replace env var
2over12 8b75cee
test if we can unset the repo
2over12 5095316
unset both vars
2over12 6c27542
try to use supplied env var
2over12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,47 @@ | ||
# | ||
# Copyright (c) 2019-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
name: Build | ||
|
||
on: | ||
# Run this workflow once every 6 hours against the master branch | ||
#schedule: | ||
# - cron: "0 */6 * * *" | ||
|
||
push: | ||
branches: | ||
- "*" | ||
|
||
tags: | ||
- "*" | ||
|
||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
build_linux: | ||
strategy: | ||
matrix: | ||
image: | ||
- { name: "ubuntu", tag: "22.04" } | ||
llvm: ["16"] | ||
cxxcommon_version: ["v0.3.2"] | ||
|
||
runs-on: ubuntu-22.04 | ||
container: | ||
image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }} | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./actions/build-cxx-common | ||
with: | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or 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,57 @@ | ||||||
name: "Lifting tools CXX-Common" | ||||||
description: "Build cxx-common latest for lifting-tools" | ||||||
inputs: | ||||||
target-export-path: # id of input | ||||||
description: "where to export the cxx-common build" | ||||||
required: true | ||||||
gh-token: | ||||||
description: "token for the target nuget cache" | ||||||
required: true | ||||||
runs: | ||||||
using: "composite" | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
with: | ||||||
submodules: true | ||||||
path: cxx-common | ||||||
repository: "lifting-bits/cxx-common" | ||||||
|
||||||
- name: Initialize vcpkg | ||||||
shell: bash | ||||||
working-directory: cxx-common | ||||||
run: | | ||||||
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1 | ||||||
git clone "${vcpkg_repo_url}" | ||||||
git -C vcpkg checkout "${vcpkg_commit}" | ||||||
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV | ||||||
echo "VCPKG_DISABLE_METRICS=1 >> $GITHUB_ENV" | ||||||
echo "VCPKG_USE_NUGET_CACHE=1 >> $GITHUB_ENV" | ||||||
echo "VCPKG_BINARY_SOURCES='clear;nuget,GitHub,readwrite;nugettimeout,3601' >> $GITHUB_ENV" | ||||||
- name: "Bootstrap vcpkg" | ||||||
shell: "bash" | ||||||
working-directory: cxx-common | ||||||
run: | | ||||||
./vcpkg/bootstrap-vcpkg.sh | ||||||
- name: "Setup NuGet Credentials" | ||||||
shell: "bash" | ||||||
working-directory: cxx-common | ||||||
run: | | ||||||
mono `./vcpkg/vcpkg fetch nuget | tail -n 1` \ | ||||||
sources add \ | ||||||
-source "https://nuget.pkg.github.com/lifting-bits/index.json" \ | ||||||
-storepasswordincleartext \ | ||||||
-name "GitHub" \ | ||||||
-username "lifting-bits" \ | ||||||
-password "${{ inputs.gh-token }}" | ||||||
mono `./vcpkg/vcpkg fetch nuget | tail -n 1` \ | ||||||
setapikey "${{ inputs.gh-token }}" \ | ||||||
-source "https://nuget.pkg.github.com/lifting-bits/index.json" | ||||||
# Omit this step if you're using manifests | ||||||
- name: "vcpkg package restore" | ||||||
working-directory: cxx-common | ||||||
shell: "bash" | ||||||
run: > | ||||||
./vcpkg/vcpkg install sqlite3 cpprestsdk | ||||||
|
./vcpkg/vcpkg install sqlite3 cpprestsdk | |
./vcpkg/vcpkg install sqlite3 cpprestsdk --debug |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very weird it's still not working... In cxx-common, we
add
first and thenupdate
... I forget if that was for a special reason, like self-hosted runners, or if the authentication is finickyhttps://github.com/lifting-bits/cxx-common/blob/94533d40904afb26ac979a8c91282f89f3c81fe3/.github/workflows/vcpkg_ci_amd64.yml#L98-L111
also, I run vcpkg from the same shell as the one I authenticate in
https://github.com/lifting-bits/cxx-common/blob/94533d40904afb26ac979a8c91282f89f3c81fe3/.github/workflows/vcpkg_ci_amd64.yml#L117