-
Notifications
You must be signed in to change notification settings - Fork 6
Hotfix for 2410 #16
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
Open
shiroinekotfs
wants to merge
5
commits into
master
Choose a base branch
from
2410-hotfix
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.
Open
Hotfix for 2410 #16
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a30a6ff
feat: build workflow
SunsetMkt d3e874c
Merge pull request #9 from SunsetMkt/master
anhvlt-2k6 cf94728
feat: ghcr publishing workflow (#10)
SunsetMkt e3db1f2
Update GNUmakefile: Fix build error with VERBOSE=1 (#14)
dbstf c440eb7
Update install.sh
anhvlt-2k6 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,147 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
# release: | ||
# types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-linux: | ||
name: Build Linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: | ||
- { name: amd64, target: x86_64-linux-gnu, apt: gcc } | ||
- { | ||
name: arm64, | ||
target: aarch64-linux-gnu, | ||
apt: gcc-aarch64-linux-gnu, | ||
} | ||
- { | ||
name: ppc64le, | ||
target: powerpc64le-linux-gnu, | ||
apt: gcc-powerpc64le-linux-gnu, | ||
} | ||
- { | ||
name: s390x, | ||
target: s390x-linux-gnu, | ||
apt: gcc-s390x-linux-gnu, | ||
} | ||
- { | ||
name: riscv64, | ||
target: riscv64-linux-gnu, | ||
apt: gcc-riscv64-linux-gnu, | ||
} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install cross-compilation toolchain | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ matrix.arch.apt }} | ||
|
||
- name: Build all & vlmcsdmulti | ||
run: | | ||
if [ "${{ matrix.arch.name }}" = "amd64" ]; then | ||
# Native build for amd64 | ||
make clean | ||
make all vlmcsdmulti STRIP=0 | ||
else | ||
# Cross-compilation for other architectures | ||
make clean | ||
make all vlmcsdmulti CC=${{ matrix.arch.target }}-gcc STRIP=0 | ||
fi | ||
|
||
- name: Prepare artifacts | ||
run: | | ||
mkdir -p artifacts/linux-${{ matrix.arch.name }} | ||
cp -r bin artifacts/linux-${{ matrix.arch.name }} | ||
cp -r lib artifacts/linux-${{ matrix.arch.name }} | ||
|
||
- name: Upload Linux artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: vlmcsd-linux-${{ matrix.arch.name }} | ||
path: artifacts/linux-${{ matrix.arch.name }}/ | ||
retention-days: 30 | ||
|
||
build-windows: | ||
name: Build Windows | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: | ||
- { | ||
name: amd64, | ||
target: x86_64-w64-mingw32, | ||
apt: gcc-mingw-w64-x86-64, | ||
} | ||
- { | ||
name: x86, | ||
target: i686-w64-mingw32, | ||
apt: gcc-mingw-w64-i686, | ||
} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install MinGW cross-compilation toolchain | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ matrix.arch.apt }} | ||
|
||
- name: Build all & vlmcsdmulti for Windows | ||
run: | | ||
make clean | ||
make all vlmcsdmulti CC=${{ matrix.arch.target }}-gcc STRIP=0 | ||
|
||
- name: Prepare artifacts | ||
run: | | ||
mkdir -p artifacts/windows-${{ matrix.arch.name }} | ||
cp -r bin artifacts/windows-${{ matrix.arch.name }} | ||
cp -r lib artifacts/windows-${{ matrix.arch.name }} | ||
|
||
- name: Upload Windows artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: vlmcsd-windows-${{ matrix.arch.name }} | ||
path: artifacts/windows-${{ matrix.arch.name }}/ | ||
retention-days: 30 | ||
|
||
# release: | ||
# name: Create Release Assets | ||
# runs-on: ubuntu-latest | ||
# needs: [build-linux, build-windows] | ||
# if: github.event_name == 'release' | ||
|
||
# steps: | ||
# - name: Download all artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# path: artifacts/ | ||
|
||
# - name: Create release archives | ||
# run: | | ||
# cd artifacts/ | ||
# for dir in */; do | ||
# archive_name="${dir%/}.tar.gz" | ||
# tar -czf "../$archive_name" -C "$dir" . | ||
# done | ||
# cd .. | ||
# ls -la *.tar.gz | ||
|
||
# - name: Upload release assets | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# files: | | ||
# *.tar.gz | ||
# env: | ||
# GITHUB_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,107 @@ | ||
name: Build and Publish Docker Image | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
on: | ||
# push: | ||
# branches: [master] | ||
# pull_request: | ||
# branches: [master] | ||
# release: | ||
# types: [published] | ||
workflow_dispatch: | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
docker-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
# This is used to complete the identity challenge | ||
# with sigstore/fulcio when running outside of PRs. | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Install the cosign tool except on PR | ||
# https://github.com/sigstore/cosign-installer | ||
- name: Install cosign | ||
if: github.event_name != 'pull_request' | ||
uses: sigstore/cosign-installer@v3 | ||
|
||
# Set up BuildKit Docker container builder to be able to build | ||
# multi-platform images and export cache | ||
# https://github.com/docker/setup-buildx-action | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Extract metadata (tags, labels) for Docker | ||
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=sha | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./.docker/Dockerfile | ||
platforms: >- | ||
linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/riscv64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
# Sign the resulting Docker image digest except on PRs. | ||
# This will only write to the public Rekor transparency log when the Docker | ||
# repository is public to avoid leaking data. If you would like to publish | ||
# transparency data even for private images, pass --force to cosign below. | ||
# https://github.com/sigstore/cosign | ||
- name: Sign the published Docker image | ||
if: ${{ github.event_name != 'pull_request' }} | ||
env: | ||
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable | ||
TAGS: ${{ steps.meta.outputs.tags }} | ||
DIGEST: ${{ steps.build-and-push.outputs.digest }} | ||
# This step uses the identity token to provision an ephemeral certificate | ||
# against the sigstore community Fulcio instance. | ||
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |
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
Oops, something went wrong.
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.
Should we leave verbose in file logging?
I mean, if each "request" take 1.5Kb, and let the service run for like, a year, I am not sure how big it can be.
Uh oh!
There was an error while loading. Please reload this page.
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.
I see, but you leave comment on the wrong segment. 🥺
Edit:
Well, I confirmed that this is the real issue. I will make a change at the lab later to see if there is any potential information that will be removed from the logging.