From 05a048a712ca1c01c05ca2930ce9a4506810a23b Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Thu, 31 Oct 2024 14:15:36 +0100 Subject: [PATCH] add github actions to generate artifacts --- .github/actions/setup-ninja/action.yml | 9 ++++++++ .github/dependabot.yml | 6 ++++++ .github/workflows/generate_artifacts.yml | 27 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .github/actions/setup-ninja/action.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/generate_artifacts.yml diff --git a/.github/actions/setup-ninja/action.yml b/.github/actions/setup-ninja/action.yml new file mode 100644 index 000000000..fc6de06a6 --- /dev/null +++ b/.github/actions/setup-ninja/action.yml @@ -0,0 +1,9 @@ +name: 'setup-ninja' +description: 'Setup Ninja' +runs: + using: "composite" + steps: + - name: Setup Ninja + uses: seanmiddleditch/gha-setup-ninja@master + - name: Setup MSVC with Ninja + uses: ilammy/msvc-dev-cmd@v1 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/generate_artifacts.yml b/.github/workflows/generate_artifacts.yml new file mode 100644 index 000000000..4b982481f --- /dev/null +++ b/.github/workflows/generate_artifacts.yml @@ -0,0 +1,27 @@ +name: Generate windows artifact +on: + push: + +jobs: + build: + name: Build windows artifact + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Ninja + uses: ./.github/actions/setup-ninja + - name: Fetch dependencies + run: python3 ./utils/fetch_sources.py --shallow + - name: Make archive + shell: bash + run: | + set -x + bash utils/make_artifact_windows_x64.sh + echo "installdir=$(realpath build-artifact*/clspv-*)" >> $GITHUB_ENV + - uses: actions/upload-artifact@v4 + with: + name: windows-artifact + path: '${{ env.installdir }}' +