From 7086d0ebd0759def0c554b0def9d214f530f9af4 Mon Sep 17 00:00:00 2001 From: Askaholic Date: Wed, 3 Nov 2021 20:43:10 -0800 Subject: [PATCH 1/5] Fix lua version string --- include/lua.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lua.h b/include/lua.h index 43bca03..e82ad9b 100644 --- a/include/lua.h +++ b/include/lua.h @@ -14,7 +14,7 @@ #include -#define LUA_VERSION "FAF Lua 5.0-0" +#define LUA_VERSION "FAF Lua 5.0-1" #define LUA_COPYRIGHT "Copyright (C) 1994-2006 Tecgraf, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" #define LUA_MODIFIED "Modified 2021 by Askaholic" From 8f780164b06e0f0670306618fef242a68bbc38bc Mon Sep 17 00:00:00 2001 From: Askaholic Date: Wed, 3 Nov 2021 21:26:18 -0800 Subject: [PATCH 2/5] Add action to build linux binaries on release --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e067bc..2e19426 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,3 +18,24 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tag_with_ref: true + + binaries: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build lua + run: make \ + MYCFLAGS='-O3 -fomit-frame-pointer' \ + USERCONF=$'-DLUA_USERCONFIG=\'"../etc/saconfig.c"\' -DUSE_READLINE' \ + EXTRA_LIBS='-lm -ldl -lreadline -lhistory' + + - name: Create archive + run: tar -czf faf-lua-linux.tar.gz bin/* include/*.h lib/*.a doc/*.1 + + - name: Upload release asset + uses: alexellis/upload-assets@0.2.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + asset_paths: '["faf-lua-linux.tar.gz"]' From 1a4d34adadd7be77dfa3e6366e1d781e7d75c564 Mon Sep 17 00:00:00 2001 From: Askaholic Date: Wed, 3 Nov 2021 21:29:23 -0800 Subject: [PATCH 3/5] REMOVE ME: Comment out docker build --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e19426..a629eb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,18 +6,18 @@ on: types: [published] jobs: - docker-image: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Build and publish docker image - uses: docker/build-push-action@v1.1.1 - with: - repository: faforever/lua - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_with_ref: true + # docker-image: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # + # - name: Build and publish docker image + # uses: docker/build-push-action@v1.1.1 + # with: + # repository: faforever/lua + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} + # tag_with_ref: true binaries: runs-on: ubuntu-latest From 2149b79c3f1bc05055e6304f13bf4f90b4862ff5 Mon Sep 17 00:00:00 2001 From: Askaholic Date: Sat, 6 Nov 2021 14:18:37 -0800 Subject: [PATCH 4/5] FIXUP --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a629eb4..0b54b9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,11 +27,14 @@ jobs: - name: Build lua run: make \ MYCFLAGS='-O3 -fomit-frame-pointer' \ - USERCONF=$'-DLUA_USERCONFIG=\'"../etc/saconfig.c"\' -DUSE_READLINE' \ + USERCONF=$'-DLUA_USERCONFIG=\'"$(LUA)/etc/saconfig.c"\' -DUSE_READLINE' \ EXTRA_LIBS='-lm -ldl -lreadline -lhistory' - name: Create archive - run: tar -czf faf-lua-linux.tar.gz bin/* include/*.h lib/*.a doc/*.1 + run: | + mkdir faf-lua-linux + cp --parents -t faf-lua-linux bin/* include/*.h lib/*.a doc/*.1 + tar -czf faf-lua-linux.tar.gz faf-lua-linux - name: Upload release asset uses: alexellis/upload-assets@0.2.2 From d8237d00a1a49c0d696d223a0ce22230d2d6708c Mon Sep 17 00:00:00 2001 From: Askaholic Date: Sat, 6 Nov 2021 15:02:19 -0800 Subject: [PATCH 5/5] Strip and add version to archive --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b54b9f..98f685c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,17 +28,18 @@ jobs: run: make \ MYCFLAGS='-O3 -fomit-frame-pointer' \ USERCONF=$'-DLUA_USERCONFIG=\'"$(LUA)/etc/saconfig.c"\' -DUSE_READLINE' \ - EXTRA_LIBS='-lm -ldl -lreadline -lhistory' + EXTRA_LIBS='-lm -ldl -lreadline -lhistory' all strip - name: Create archive run: | - mkdir faf-lua-linux - cp --parents -t faf-lua-linux bin/* include/*.h lib/*.a doc/*.1 - tar -czf faf-lua-linux.tar.gz faf-lua-linux + export ARCHIVE=faf-lua-${GITHUB_REF#refs/*/v}-linux + mkdir $ARCHIVE + cp --parents -t $ARCHIVE bin/* include/*.h lib/*.a doc/*.1 + tar -czf $ARCHIVE.tar.gz $ARCHIVE - name: Upload release asset uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["faf-lua-linux.tar.gz"]' + asset_paths: '["faf-lua-*-linux.tar.gz"]'