From 42f8368a40fb3f69fd9639191e23de9bae059c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 29 Mar 2022 20:20:36 +0800 Subject: [PATCH] add Cosmopolitan --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6fa78a9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: release +on: + push: + tags: + - v* + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + my-job: + name: Build on Push Tag 🚀 + runs-on: ubuntu-latest + steps: + + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Build tools + run: | + sudo apt-get update + sudo apt-get install -y gcc + wget https://justine.lol/cosmopolitan/cosmopolitan-amalgamation-1.0.zip + unzip cosmopolitan-amalgamation-1.0.zip + + - name: Build Cosmopolitan + run: | + gcc -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \ + -fno-omit-frame-pointer -pg -mnop-mcount \ + -o base16384.com.dbg base16384.c base1432.c base14.c -fuse-ld=bfd -Wl,-T,ape.lds \ + -include cosmopolitan.h crt.o ape.o cosmopolitan.a + objcopy -S -O binary base16384.com.dbg base16384.com + + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: base16384.com + tag: ${{ github.ref }} + overwrite: true + file_glob: true \ No newline at end of file