Skip to content

Commit

Permalink
Add package workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
david4r4 committed Jan 5, 2025
1 parent 68000c0 commit 7881365
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: build and test

on:
push:
branches: [ mob ]

jobs:
create-tag:
runs-on: ubuntu-24.04
permissions: write-all
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Create tag
if: github.ref == 'refs/heads/mob'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
set -eux
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
TAG="dev"
gh release delete $TAG --yes || true
git tag -d $TAG || true
git push origin --delete $TAG || true
git fetch --tags
git tag -l
git tag $TAG
git push origin $TAG
test-x86_64-linux:
runs-on: ubuntu-24.04
permissions: write-all
needs: create-tag
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Build and install (x86_64-linux)
run: ./configure --prefix=tinycc && make && make install
- name: Package
run: |
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on tcc-x86_64-linux.7z tinycc
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/mob'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: "Development build"
tag_name: dev
fail_on_unmatched_files: true
make_latest: true
files: |
tcc-x86_64-linux.7z
test-aarch64-macos:
runs-on: macos-14
timeout-minutes: 20
permissions: write-all
needs: create-tag
steps:
- uses: actions/checkout@v4
- name: Build and install (aarch64-macos)
run: ./configure --prefix=tinycc && make && make install
- name: Package
run: |
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on tcc-aarch64-macos.7z tinycc
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/mob'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: "Development build"
tag_name: dev
fail_on_unmatched_files: true
make_latest: true
files: |
tcc-aarch64-macos.7z
test-x86_64-windows:
runs-on: windows-2022
timeout-minutes: 20
permissions: write-all
needs: create-tag
steps:
- uses: actions/checkout@v4
- name: Build and install (x86_64-windows)
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd win32
build-tcc.bat -i tinycc -c cl
- name: Package
run: |
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on tcc-x86_64-windows.7z win32\tinycc
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/mob'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: "Development build"
tag_name: dev
fail_on_unmatched_files: true
make_latest: true
files: |
tcc-x86_64-windows.7z
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ tcc.1
tcc-doc.html
tcc-doc.info

/tinycc/

win32/doc
win32/examples/libtcc_test.c
win32/libtcc
Expand Down

0 comments on commit 7881365

Please sign in to comment.