From 2236561d36bb2b496e928dcc5095467410cdd457 Mon Sep 17 00:00:00 2001 From: RICCIARDI-Adrien Date: Sun, 20 Aug 2023 23:11:52 +0200 Subject: [PATCH 1/2] CI: Added Linux x86_64 build. Use the oldest supported Ubuntu LTS as build image to create a binary that will be compatible with almost all current distributions. Signed-off-by: RICCIARDI-Adrien --- .github/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..ca62bdc0 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,35 @@ +name: Continuous build and release +on: [push, pull_request] + +jobs: + nix_x86_64: + name: Linux x86_64 + runs-on: ubuntu-latest + container: ubuntu:20.04 + env: + RELEASE_DIRECTORY: /tmp/OpenLara_Release + RELEASE_FILE_README: /tmp/OpenLara_Release/readme.txt + steps: + - name: Retrieve sources + uses: actions/checkout@v3 + - name: Install dependencies + run: | + apt update + DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y clang libgl-dev libpulse-dev libx11-dev zip + - name: Build + run: ./build.sh + working-directory: src/platform/nix + - name: Create archive + run: | + mkdir -p ${{ env.RELEASE_DIRECTORY }} + cp bin/OpenLara ${{ env.RELEASE_DIRECTORY }} + printf "Instructions:\n" > ${{ env.RELEASE_FILE_README }} + printf "STEP 1: Let's assume that you own the original game, so download and unzip (\"extract here\") these archives:\n" >> ${{ env.RELEASE_FILE_README }} + printf " http://xproger.info/projects/OpenLara/files/TR1_data.7z\n" >> ${{ env.RELEASE_FILE_README }} + printf " http://xproger.info/projects/OpenLara/files/TR1_audio.7z\n" >> ${{ env.RELEASE_FILE_README }} + printf "STEP 2: Copy the extracted folders (audio, PSXDATA, DELDATA & FMV) next to the OpenLara file\n" >> ${{ env.RELEASE_FILE_README }} + printf "STEP 3: Run OpenLara application and enjoy the game!\n\n" >> ${{ env.RELEASE_FILE_README }} + printf "YouTube: https://youtube.com/c/TimurGagiev\n" >> ${{ env.RELEASE_FILE_README }} + printf "Discord: https://discord.gg/EF8JaQB\n" >> ${{ env.RELEASE_FILE_README }} + printf "Telegram: https://t.me/openlara\n" >> ${{ env.RELEASE_FILE_README }} + cd ${{ env.RELEASE_DIRECTORY }} && zip OpenLara_nix.zip * From ef36c60f6d56fd7efc8fcacd09a8a664b098b428 Mon Sep 17 00:00:00 2001 From: RICCIARDI-Adrien Date: Mon, 21 Aug 2023 00:01:56 +0200 Subject: [PATCH 2/2] CI: Added automated release of the Linux x86_64 build when pushing to the master branch. Signed-off-by: RICCIARDI-Adrien --- .github/workflows/build.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ca62bdc0..0889decb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,6 +1,9 @@ name: Continuous build and release on: [push, pull_request] +permissions: + contents: write + jobs: nix_x86_64: name: Linux x86_64 @@ -33,3 +36,10 @@ jobs: printf "Discord: https://discord.gg/EF8JaQB\n" >> ${{ env.RELEASE_FILE_README }} printf "Telegram: https://t.me/openlara\n" >> ${{ env.RELEASE_FILE_README }} cd ${{ env.RELEASE_DIRECTORY }} && zip OpenLara_nix.zip * + - name: Release (only when pushing to the master branch) + uses: softprops/action-gh-release@v1 + if: ${{ github.ref == 'refs/heads/master' }} + with: + files: ${{ env.RELEASE_DIRECTORY }}/OpenLara_nix.zip + name: Continuous build + tag_name: continuous-build