Update README.md #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Modshot with Steam support | |
on: push | |
jobs: | |
build-windows: | |
name: Build ModShot for Windows (Steam support) | |
runs-on: windows-2019 | |
env: | |
CONAN_USER_HOME: C:\.conan | |
CONAN_USER_HOME_SHORT: C:\.conan | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install conan and xxd | |
run: choco install -y vim; pip install conan | |
- name: Set path to include xxd | |
run: '[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\tools\vim\vim82", "Machine")' | |
- name: Configure conan | |
run: | | |
conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza; | |
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan; | |
conan remote add astrabit https://rkevin.jfrog.io/artifactory/api/conan/astrabit; | |
conan config set general.revisions_enabled=1; | |
setx CONAN_USE_ALWAYS_SHORT_PATHS 1; | |
mkdir ${{ runner.temp }}\build | |
- name: Cache conan dependencies | |
uses: actions/cache@v2 | |
with: | |
path: C:\.conan | |
key: ${{ runner.os }}-cached-conan-modules-${{ hashFiles('conanfile.py') }}-steam | |
- name: Build dependencies using conan | |
run: conan install ${{ github.workspace }} --build=missing -o platform=steam | |
working-directory: ${{ runner.temp }}\build | |
- name: Build ModShot | |
run: conan build ${{ github.workspace }} | |
working-directory: ${{ runner.temp }}\build | |
- name: Create dist folder | |
run: | | |
mkdir ${{ runner.temp }}\built_artifact; | |
move ${{ runner.temp }}\build\bin\lib ${{ runner.temp }}\built_artifact\lib; | |
move ${{ runner.temp }}\build\bin\* ${{ runner.temp }}\built_artifact\lib; | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: modshot_build_steam_windows_${{ github.sha }} | |
path: ${{ runner.temp }}\built_artifact | |
build-linux: | |
name: Build ModShot for Linux (Steam support) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y \ | |
libgtk2.0-dev libxfconf-0-dev libwmf0.2-7-gtk libegl1-mesa-dev libgbm-dev libasound2-dev libjack-dev libpulse-dev libaudio-dev patchelf && | |
sudo curl -Lo /usr/local/bin/linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && | |
sudo chmod +x /usr/local/bin/linuxdeploy-x86_64.AppImage | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
- name: Install and configure conan | |
run: | | |
pip3 install conan | |
conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza; | |
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan; | |
conan remote add astrabit https://rkevin.jfrog.io/artifactory/api/conan/astrabit; | |
conan config set general.revisions_enabled=1; | |
mkdir ${{ runner.temp }}/build | |
- name: Cache conan dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.conan | |
key: ${{ runner.os }}-cached-conan-modules-${{ hashFiles('conanfile.py') }}-steam | |
- name: Build dependencies using conan | |
run: conan install ${{ github.workspace }} --build=missing -o platform=steam | |
working-directory: ${{ runner.temp }}/build | |
- name: Build ModShot | |
run: conan build ${{ github.workspace }} | |
working-directory: ${{ runner.temp }}/build | |
- name: Create dist folder | |
run: | | |
mkdir ${{ runner.temp }}/dist && | |
${{ github.workspace }}/make-linux-dist.sh ${{ runner.temp }}/build ${{ runner.temp }}/dist && | |
cd ${{ runner.temp }}/dist && | |
rm oneshot && | |
tar czf ${{ runner.temp }}/modshot_${{ github.sha }}.tar.gz . | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: modshot_build_steam_linux_${{ github.sha }} | |
path: ${{ runner.temp }}/modshot_${{ github.sha }}.tar.gz |