mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
6612297022
This create a GitHub Actions workflow to build the docker images we use in our CI workflows. Signed-off-by: Anton Lundin <glance@acc.umu.se>
70 lines
2.3 KiB
YAML
70 lines
2.3 KiB
YAML
name: Windows
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
buildInContainer:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
# FIXME: Use templating once we can mangle org/repo name into something that docker accepts.
|
|
# and anonymus / actions access to github packages works.
|
|
#image: docker://docker.pkg.github.com/${{ github.repository }}/mxe-build-container:0.9
|
|
image: docker://dirkhh/mxe-build-container:0.9
|
|
|
|
steps:
|
|
- name: checkout sources
|
|
uses: actions/checkout@v1
|
|
|
|
- name: get other dependencies
|
|
run: |
|
|
echo "creating the link from /win/subsurface"
|
|
cd /win
|
|
ln -s /__w/subsurface/subsurface .
|
|
ls -l
|
|
ls -l subsurface/scripts
|
|
echo "installing missing container components"
|
|
apt-get install -y ca-certificates libtool
|
|
echo "downloading sources for fresh build"
|
|
bash subsurface/scripts/get-dep-lib.sh single . libzip
|
|
bash subsurface/scripts/get-dep-lib.sh single . hidapi
|
|
bash subsurface/scripts/get-dep-lib.sh single . googlemaps
|
|
bash subsurface/scripts/get-dep-lib.sh single . grantlee
|
|
bash subsurface/scripts/get-dep-lib.sh single . mdbtools
|
|
|
|
- name: run build
|
|
run: |
|
|
cd /win
|
|
bash -x subsurface/.github/workflows/scripts/windows-in-container-build.sh 2>&1 | tee build.log
|
|
grep "Built target installer" build.log
|
|
|
|
- name: create CI release
|
|
if: github.event_name == 'push'
|
|
uses: ./.github/actions/release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPO: ${{ github.repository }}
|
|
REF: ${{ github.ref }}
|
|
COMMIT: ${{ github.sha }}
|
|
BIN1: ./subsurface-installer.exe
|
|
BIN2: ./subsurface.exe
|
|
BIN3: ./subsurface.exe.debug
|
|
BIN4: ./smtk2ssrf-installer.exe
|
|
BIN5: ./smtk2ssrf.exe
|
|
|
|
- name: prepare PR artifacts
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
mkdir -p Windows-artifacts
|
|
mv ./subsurface-installer.exe ./subsurface.exe ./subsurface.exe.debug ./smtk2ssrf-installer.exe ./smtk2ssrf.exe Windows-artifacts
|
|
|
|
- name: PR artifacts
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: Windows-artifacts
|
|
path: Windows-artifacts
|