Skip to content

Commit

Permalink
Add a gh workflow to create a packed version of the library
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed Jul 24, 2024
1 parent aa5854c commit 3369143
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pack cc-runtime

on: [push]

jobs:
pack:
name: Pack cc-runtime
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Pack cc-runtime
run: |
set -e
cat assembly.h int_util.h int_endianness.h int_types.h int_lib.h *.inc *.c > /tmp/cc-runtime.c
sed -i '/#include/d' /tmp/cc-runtime.c
- name: Push packed cc-runtime
run: |
set -ex
git config user.name 'mintsuki'
git config user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/osdev0/cc-runtime.git
git fetch --all
git checkout packed || git checkout --orphan packed
rm -rf .github *.c *.h *.inc
mv /tmp/cc-runtime.c ./
git add -f .
git commit -m "Push packed cc-runtime.c"
git push origin packed

0 comments on commit 3369143

Please sign in to comment.