forked from ValveSoftware/Proton
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Actions workflow to build on top of the Steam Linux Runtime
* Add reusable Build workflow to build proton * Add Release workflow to build and release proton when a release is published * Add Development workflow with manual dispatch only
- Loading branch information
1 parent
0723c91
commit c5aa09e
Showing
3 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
proton: | ||
name: ${{ inputs.name }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Prepare host | ||
run: sudo apt update && sudo apt-get install -y ccache fontforge-nox | ||
|
||
- name: Download cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.ccache | ||
key: ccache-proton-${{ github.run_id }} | ||
restore-keys: | | ||
ccache-proton | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
submodules: recursive | ||
|
||
- name: Patch | ||
run: | | ||
mkdir ./build | ||
- name: Configure | ||
working-directory: ./build | ||
run: ../configure.sh --build-name=${{ inputs.name }} --enable-ccache --container-engine=docker | ||
|
||
- name: Make ${{ inputs.name }} | ||
working-directory: ./build | ||
run: make -j3 redist | ||
|
||
- name: Upload artifact ${{ inputs.name }}.tar.gz | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }}.tar.gz | ||
path: ./build/${{ inputs.name }}.tar.gz | ||
|
||
- name: Upload artifact ${{ inputs.name }}.sha512sum | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }}.sha512sum | ||
path: ./build/${{ inputs.name }}.sha512sum |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Development | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
version: | ||
name: Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag_abbrev: ${{ steps.version.outputs.tag_abbrev }} | ||
tag_offset: ${{ steps.version.outputs.tag_offset }} | ||
sha_short: ${{ steps.version.outputs.sha_short }} | ||
full_desc: ${{ steps.version.outputs.full_desc }} | ||
branch: ${{ steps.version.outputs.branch }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Version | ||
id: version | ||
shell: bash | ||
run: | | ||
tag_abbrev=$(git describe --tags --abbrev=0) | ||
echo "tag_abbrev=$tag_abbrev" >> $GITHUB_OUTPUT | ||
echo "tag_offset=$(git rev-list $tag_abbrev..HEAD --count)" >> $GITHUB_OUTPUT | ||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
echo "full_desc=$(git describe --long --tags)" >> $GITHUB_OUTPUT | ||
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
build: | ||
needs: version | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
name: proton-${{ needs.version.outputs.full_desc }}-${{ needs.version.outputs.branch }} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
name: proton-${{ github.ref_name }} | ||
|
||
release: | ||
name: Release ${{ github.ref_name }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download ${{ github.ref_name }}.tar.gz artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: proton-${{ github.ref_name }}.tar.gz | ||
|
||
- name: Download ${{ github.ref_name }}.sha512sum artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: proton-${{ github.ref_name }}.sha512sum | ||
|
||
- name: Upload ${{ github.ref_name }}.tar.gz to release | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
file: proton-${{ github.ref_name }}.tar.gz | ||
overwrite: false | ||
|
||
- name: Upload ${{ github.ref_name }}.sha512sum to release | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
file: proton-${{ github.ref_name }}.sha512sum | ||
overwrite: false |