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 ca6c234
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
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-20.04
needs: create-tag
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Package (x86_64-linux)
run: ./configure --prefix=tinycc && make && make install
- name: Release - Attempt 1
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: |
tinycc/**
test-aarch64-macos:
runs-on: macos-14
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Package (aarch64-macos)
run: ./configure --prefix=tinycc && make && make install
test-x86_64-windows:
runs-on: windows-2022
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: Package (x86_64-windows)
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
pushd win32
build-tcc.bat -i tinycc -c cl
popd
echo "Dir ."
dir
echo "Dir win32"
dir win32
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
2 changes: 2 additions & 0 deletions win32/build-tcc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ for %%f in (lib\*.a lib\*.o lib\*.def) do @copy>nul %%f %TCCDIR%\%%f
for %%f in (include examples libtcc doc) do @xcopy>nul /s/i/q/y %%f %TCCDIR%\%%f

:the_end
dir
dir ..
exit /B %ERRORLEVEL%

:make_lib
Expand Down

0 comments on commit ca6c234

Please sign in to comment.