Skip to content

Merge branch 'endless-sky:master' into experimental #318

Merge branch 'endless-sky:master' into experimental

Merge branch 'endless-sky:master' into experimental #318

Workflow file for this run

name: CD
on:
push:
branches:
- master
- mirror
- main
- experimental
pull_request:
types:
- synchronize
- opened
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cd_appimage_x64:
name: Linux
runs-on: ubuntu-20.04
env:
OUTPUT: Endless_Sky-continuous-x86_64.AppImage
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install dependencies
run: |
sudo rm /etc/apt/sources.list.d/* && sudo dpkg --clear-avail # Speed up installation and get rid of unwanted lists
sudo apt-get update
sudo apt-get install -y --no-install-recommends libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libgles2-mesa-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev
- name: Setup sccache
uses: ./.github/sccache
- name: Adjust version strings
run: ./utils/cd_update_versions.sh
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'linux-release'
buildPreset: 'linux-ci-release'
- name: Package Application
run: ./utils/build_appimage.sh build/release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
cd_windows_x64:
name: Windows
runs-on: windows-2022
env:
OUTPUT: EndlessSky-win64-continuous.zip
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup sccache
uses: ./.github/sccache
- name: Adjust version strings
run: ./utils/cd_update_versions.sh
shell: bash
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'mingw-release'
buildPreset: 'mingw-ci-release'
- name: Package Application
run: |
cmake --install build/release
7z a ${{ env.OUTPUT }} "./install/release/*"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
cd_macos_x64:
name: MacOS
runs-on: macos-12
env:
OUTPUT: EndlessSky-macOS-continuous.zip
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup sccache
uses: ./.github/sccache
- name: Install pkg-config
run: type -P pkg-config || brew install pkg-config
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9'
- uses: lukka/run-cmake@v10
with:
configurePreset: 'macos-release'
buildPreset: 'macos-ci-release'
- name: Package Application
run: |
cmake --install build/release
7z a ${{ env.OUTPUT }} "./install/release/*"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
cd_upload_artifacts_to_release:
name: Upload
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs:
- cd_appimage_x64
- cd_windows_x64
- cd_macos_x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT_APPIMAGE: Endless_Sky-continuous-x86_64.AppImage
OUTPUT_WINDOWS: EndlessSky-win64-continuous.zip
OUTPUT_MACOS: EndlessSky-macOS-continuous.zip
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install github-release
run: |
go install github.com/github-release/github-release@latest
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Set environment variables
run: |
echo "GITHUB_USER=$( echo ${{ github.repository }} | cut -d/ -f1 )" >> $GITHUB_ENV
echo "GITHUB_REPO=$( echo ${{ github.repository }} | cut -d/ -f2 )" >> $GITHUB_ENV
- name: Move/Create continuous tag
run: |
git tag --force continuous ${{ github.sha }}
git push --tags --force
- name: Setup continuous release
run: |
DESCRIPTION="Triggered on $(date -u '+%Y/%m/%d, %H:%M') UTC by commit ${{ github.sha }} (@${{ github.actor }})
This is an automated build of the latest source. It may be unstable or even crash, corrupt your save or eat your kitten. Use with caution!
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
if ! github-release info -t continuous > /dev/null 2>&1; then
github-release release \
--tag continuous \
--name "Continuous Build" \
--description "$DESCRIPTION" \
--pre-release
else
github-release edit \
--tag continuous \
--name "Continuous Build" \
--description "$DESCRIPTION" \
--pre-release
fi
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }} # This will download all files to e.g `./EndlessSky-win64.zip/EndlessSky-win64.zip`
- name: Add ${{ env.OUTPUT_APPIMAGE }} to release tag
continue-on-error: true
run: |
github-release upload \
--tag continuous \
--replace \
--name ${{ env.OUTPUT_APPIMAGE }} \
--file ${{ env.OUTPUT_APPIMAGE }}/${{ env.OUTPUT_APPIMAGE }}
- name: Add ${{ env.OUTPUT_WINDOWS }} to release tag
continue-on-error: true
run: |
github-release upload \
--tag continuous \
--replace \
--name ${{ env.OUTPUT_WINDOWS }} \
--file ${{ env.OUTPUT_WINDOWS }}/${{ env.OUTPUT_WINDOWS }}
- name: Add ${{ env.OUTPUT_MACOS }} to release tag
run: |
github-release upload \
--tag continuous \
--replace \
--name ${{ env.OUTPUT_MACOS }} \
--file ${{ env.OUTPUT_MACOS }}/${{ env.OUTPUT_MACOS }}