20240412.1 #83
Workflow file for this run
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: ikvm-native-sdk | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- created | |
jobs: | |
build-win: | |
name: Build (win) | |
runs-on: ubuntu-latest | |
timeout-minutes: 240 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install | |
run: | | |
sudo apt-get update && | |
sudo apt-get install -y zip unzip curl wget | |
- name: Cache (xwin) | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/xwincache | |
key: tmp--xwincache--${{ matrix.rid }}--${{ runner.os }}--${{ hashFiles('win/build.sh') }}-1 | |
- name: Build | |
run: win/build.sh | |
- name: Package (win) | |
run: tar czvf /tmp/win.tar.gz win | |
working-directory: dist | |
- name: Upload (win) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win | |
path: /tmp/win.tar.gz | |
- name: Package (win.ci) | |
run: tar czvf /tmp/win.ci.tar.gz win.ci | |
working-directory: dist | |
- name: Upload (win.ci) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win.ci | |
path: /tmp/win.ci.tar.gz | |
build-linux: | |
strategy: | |
matrix: | |
rid: | |
- linux-x64 | |
- linux-musl-x64 | |
- linux-arm | |
- linux-musl-arm | |
- linux-arm64 | |
- linux-musl-arm64 | |
name: Build (${{ matrix.rid }}) | |
runs-on: ubuntu-latest | |
timeout-minutes: 240 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: dist/${{ matrix.rid }} | |
key: dist--${{ matrix.rid }}--${{ runner.os }}--${{ hashFiles('linux/build.sh', 'linux/*/.config', 'linux/*/sdk.config') }}-1 | |
- name: Check | |
id: dist-linux-stamp | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: dist/${{ matrix.rid }}/stamp | |
- name: Install | |
if: steps.dist-linux-stamp.outputs.files_exists != 'true' | |
run: | | |
sudo apt-get update && | |
sudo apt-get install -y \ | |
build-essential fakeroot \ | |
gcc g++ \ | |
ninja-build zip unzip curl wget \ | |
help2man bison flex libtool libtool-bin patch libstdc++6 rsync git meson xutils-dev xz-utils texinfo symlinks \ | |
autopoint gettext gperf expat \ | |
libx11-dev | |
- name: Build | |
if: steps.dist-linux-stamp.outputs.files_exists != 'true' | |
run: linux/build.sh ${{ matrix.rid }} && touch dist/${{ matrix.rid }}/stamp | |
- name: Package | |
run: tar czvf /tmp/${{ matrix.rid }}.tar.gz ${{ matrix.rid }} | |
working-directory: dist | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.rid }} | |
path: /tmp/${{ matrix.rid }}.tar.gz | |
build-osx: | |
name: Build (osx) | |
runs-on: ubuntu-latest | |
timeout-minutes: 240 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: dist/osx | |
key: dist--osx--${{ runner.os }}--${{ hashFiles('osx/build.sh') }}-1 | |
- name: Check | |
id: dist-osx-stamp | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: dist/osx/stamp | |
- name: Install | |
if: steps.dist-osx-stamp.outputs.files_exists != 'true' | |
run: | | |
sudo apt-get update && | |
sudo apt-get install -y zip unzip curl | |
- name: Build | |
if: steps.dist-osx-stamp.outputs.files_exists != 'true' | |
run: osx/build.sh && touch dist/osx/stamp | |
- name: Package | |
run: tar czvf /tmp/osx.tar.gz osx | |
working-directory: dist | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: osx | |
path: /tmp/osx.tar.gz | |
release: | |
name: Release | |
if: github.event_name != 'pull_request' | |
needs: | |
- build-win | |
- build-linux | |
- build-osx | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download (win) | |
uses: actions/download-artifact@v4 | |
with: | |
name: win | |
path: dist | |
- name: Download (win.ci) | |
uses: actions/download-artifact@v4 | |
with: | |
name: win.ci | |
path: dist | |
- name: Download (linux-x64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-x64 | |
path: dist | |
- name: Download (linux-musl-x64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-musl-x64 | |
path: dist | |
- name: Download (linux-arm64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-arm64 | |
path: dist | |
- name: Download (linux-musl-arm64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-musl-arm64 | |
path: dist | |
- name: Download (linux-arm) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-arm | |
path: dist | |
- name: Download (linux-musl-arm) | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-musl-arm | |
path: dist | |
- name: Download (osx) | |
uses: actions/download-artifact@v4 | |
with: | |
name: osx | |
path: dist | |
- name: Create Release | |
if: github.ref_type == 'tag' | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref_name }} | |
allowUpdates: true | |
artifacts: dist/*.tar.gz | |
draft: false | |
makeLatest: true | |
token: ${{ secrets.GITHUB_TOKEN }} |