Skip to content

Commit bc68db1

Browse files
authored
Update release-crosscompile.yml
1 parent b4acd5a commit bc68db1

File tree

1 file changed

+22
-39
lines changed

1 file changed

+22
-39
lines changed
Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cross-Compile TCC for Windows & Linux
1+
name: Cross-Compile TCC
22

33
on:
44
push:
@@ -7,78 +7,61 @@ on:
77
pull_request:
88
branches:
99
- mob
10-
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
1113

1214
jobs:
1315
build:
1416
runs-on: ubuntu-latest
1517

1618
steps:
17-
- name: Checkout source code
19+
- name: Checkout TCC source code
1820
uses: actions/checkout@v4
1921
with:
2022
repository: Tiny-C-Compiler/mirror-repository
2123
ref: mob
22-
fetch-depth: 0
2324

2425
- name: Install dependencies
2526
run: |
26-
echo "Installing dependencies..."
27-
sudo apt update
28-
sudo apt install -y mingw-w64 build-essential make autoconf
29-
30-
- name: Debug: Verify installed compilers
31-
run: |
32-
echo "GCC version:"
33-
gcc --version
34-
echo "MinGW-w64 version:"
35-
x86_64-w64-mingw32-gcc --version
27+
sudo apt-get update
28+
sudo apt-get install -y mingw-w64 gcc-mingw-w64 make autoconf automake
3629
37-
- name: Extract version info
30+
- name: Debug environment
3831
run: |
39-
echo "Extracting version info..."
40-
TCC_VERSION=$(head -n 1 VERSION)
41-
echo "TCC Version: $TCC_VERSION"
42-
echo "TCC_VERSION=$TCC_VERSION" >> $GITHUB_ENV
32+
echo "PATH: $PATH"
33+
echo "GCC Version: $(gcc --version)"
34+
echo "MinGW-w64 Version: $(x86_64-w64-mingw32-gcc --version)"
4335
4436
- name: Compile for Linux
4537
run: |
46-
echo "Compiling for Linux..."
4738
./configure
4839
make -j$(nproc)
4940
strip tcc
5041
mv tcc tcc-linux
5142
52-
- name: Compile for Windows (Cross-Compile)
43+
- name: Compile for Windows (cross-compile)
5344
run: |
54-
echo "Compiling for Windows..."
5545
./configure --cross-prefix=x86_64-w64-mingw32-
5646
make -j$(nproc)
57-
strip tcc.exe
47+
x86_64-w64-mingw32-strip tcc.exe
5848
mv tcc.exe tcc-windows.exe
5949
60-
- name: Debug: List built binaries
61-
run: ls -lh tcc-linux tcc-windows.exe
62-
63-
- name: Create Release Assets
50+
- name: Create release artifacts
6451
run: |
6552
mkdir release
6653
mv tcc-linux release/tcc-linux
6754
mv tcc-windows.exe release/tcc-windows.exe
68-
tar -czvf tcc-linux.tar.gz -C release tcc-linux
69-
zip -r tcc-windows.zip release/tcc-windows.exe
70-
ls -lh tcc-linux.tar.gz tcc-windows.zip
55+
tar -czvf tcc-latest-linux.tar.gz -C release tcc-linux
56+
zip -r tcc-latest-windows.zip release/tcc-windows.exe
7157
72-
- name: Upload to GitHub Releases
58+
- name: Upload release to GitHub
7359
uses: softprops/action-gh-release@v2
7460
with:
75-
token: ${{ secrets.GITHUB_TOKEN }}
7661
tag_name: latest
77-
repository: Tiny-C-Compiler/mirror-repository
78-
name: "Latest TinyCC Build"
79-
body: "Automated build for TinyCC (Linux & Windows)."
80-
draft: false
81-
prerelease: false
8262
files: |
83-
tcc-linux.tar.gz
84-
tcc-windows.zip
63+
tcc-latest-linux.tar.gz
64+
tcc-latest-windows.zip
65+
repository: Tiny-C-Compiler/mirror-repository
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)