mirror of https://github.com/xemu-project/xemu.git
ci: Pin actions to commit hash
This commit is contained in:
parent
9e58abc951
commit
bdea219236
|
@ -21,10 +21,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone tree
|
- name: Clone tree
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
- name: Extract image metadata (tags, labels)
|
- name: Extract image metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
labels: |
|
labels: |
|
||||||
|
@ -35,16 +35,16 @@ jobs:
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=sha
|
type=sha
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
|
||||||
with:
|
with:
|
||||||
context: ubuntu-win64-cross
|
context: ubuntu-win64-cross
|
||||||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone tree
|
- name: Clone tree
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
@ -50,7 +50,7 @@ jobs:
|
||||||
./scripts/archive-source.sh src.tar
|
./scripts/archive-source.sh src.tar
|
||||||
gzip -1 src.tar
|
gzip -1 src.tar
|
||||||
- name: Upload source package artifact
|
- name: Upload source package artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: src.tar.gz
|
name: src.tar.gz
|
||||||
path: src.tar.gz
|
path: src.tar.gz
|
||||||
|
@ -83,14 +83,14 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download source package
|
- name: Download source package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: src.tar.gz
|
name: src.tar.gz
|
||||||
- name: Extract source package
|
- name: Extract source package
|
||||||
run: tar xf src.tar.gz
|
run: tar xf src.tar.gz
|
||||||
- name: Initialize compiler cache
|
- name: Initialize compiler cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
path: /tmp/xemu-ccache
|
path: /tmp/xemu-ccache
|
||||||
key: cache-wincross-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }}
|
key: cache-wincross-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }}
|
||||||
|
@ -111,7 +111,7 @@ jobs:
|
||||||
$DOCKER_IMAGE_NAME \
|
$DOCKER_IMAGE_NAME \
|
||||||
bash -c "ccache -z; ./build.sh -p win64-cross ${{ matrix.build_param }} && ccache -s"
|
bash -c "ccache -z; ./build.sh -p win64-cross ${{ matrix.build_param }} && ccache -s"
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}
|
name: ${{ matrix.artifact_name }}
|
||||||
path: dist
|
path: dist
|
||||||
|
@ -140,7 +140,7 @@ jobs:
|
||||||
arch: aarch64
|
arch: aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}
|
name: ${{ matrix.artifact_name }}
|
||||||
path: ${{ matrix.artifact_name }}
|
path: ${{ matrix.artifact_name }}
|
||||||
|
@ -157,7 +157,7 @@ jobs:
|
||||||
7z a -tzip ../dist/${{ matrix.artifact_name }}.zip * "-xr!*.pdb"
|
7z a -tzip ../dist/${{ matrix.artifact_name }}.zip * "-xr!*.pdb"
|
||||||
7z a -tzip ../dist/${{ matrix.artifact_name }}-pdb.zip "-ir!*.pdb"
|
7z a -tzip ../dist/${{ matrix.artifact_name }}-pdb.zip "-ir!*.pdb"
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}-pdb
|
name: ${{ matrix.artifact_name }}-pdb
|
||||||
path: dist
|
path: dist
|
||||||
|
@ -196,13 +196,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Initialize compiler cache
|
- name: Initialize compiler cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
path: /tmp/xemu-ccache
|
path: /tmp/xemu-ccache
|
||||||
key: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }}
|
key: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ github.sha }}
|
||||||
restore-keys: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-
|
restore-keys: cache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-
|
||||||
- name: Download source package
|
- name: Download source package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: src.tar.gz
|
name: src.tar.gz
|
||||||
- name: Extract source package
|
- name: Extract source package
|
||||||
|
@ -266,7 +266,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
tar -czvf ${{ matrix.artifact_filename }} --transform "s#^dist#xemu#" dist
|
tar -czvf ${{ matrix.artifact_filename }} --transform "s#^dist#xemu#" dist
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}
|
name: ${{ matrix.artifact_name }}
|
||||||
path: ${{ matrix.artifact_filename }}
|
path: ${{ matrix.artifact_filename }}
|
||||||
|
@ -300,7 +300,7 @@ jobs:
|
||||||
artifact_filename: xemu-macos-arm64-release.zip
|
artifact_filename: xemu-macos-arm64-release.zip
|
||||||
steps:
|
steps:
|
||||||
- name: Download source package
|
- name: Download source package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: src.tar.gz
|
name: src.tar.gz
|
||||||
- name: Extract source package
|
- name: Extract source package
|
||||||
|
@ -319,7 +319,7 @@ jobs:
|
||||||
pip install pyyaml requests
|
pip install pyyaml requests
|
||||||
- name: Initialize compiler, library cache
|
- name: Initialize compiler, library cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
xemu-ccache
|
xemu-ccache
|
||||||
|
@ -339,7 +339,7 @@ jobs:
|
||||||
zip -r ../${{ matrix.artifact_filename }} *
|
zip -r ../${{ matrix.artifact_filename }} *
|
||||||
popd
|
popd
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}
|
name: ${{ matrix.artifact_name }}
|
||||||
path: ${{ matrix.artifact_filename }}
|
path: ${{ matrix.artifact_filename }}
|
||||||
|
@ -353,12 +353,12 @@ jobs:
|
||||||
configuration: ["debug", "release"]
|
configuration: ["debug", "release"]
|
||||||
steps:
|
steps:
|
||||||
- name: Download x86_64 build
|
- name: Download x86_64 build
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: xemu-macos-x86_64-${{ matrix.configuration }}
|
name: xemu-macos-x86_64-${{ matrix.configuration }}
|
||||||
path: xemu-macos-x86_64-${{ matrix.configuration }}
|
path: xemu-macos-x86_64-${{ matrix.configuration }}
|
||||||
- name: Download arm64 build
|
- name: Download arm64 build
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: xemu-macos-arm64-${{ matrix.configuration }}
|
name: xemu-macos-arm64-${{ matrix.configuration }}
|
||||||
path: xemu-macos-arm64-${{ matrix.configuration }}
|
path: xemu-macos-arm64-${{ matrix.configuration }}
|
||||||
|
@ -382,7 +382,7 @@ jobs:
|
||||||
zip -r ../xemu-macos-universal-${{ matrix.configuration }}.zip *
|
zip -r ../xemu-macos-universal-${{ matrix.configuration }}.zip *
|
||||||
popd
|
popd
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||||
with:
|
with:
|
||||||
name: xemu-macos-universal-${{ matrix.configuration }}
|
name: xemu-macos-universal-${{ matrix.configuration }}
|
||||||
path: xemu-macos-universal-${{ matrix.configuration }}.zip
|
path: xemu-macos-universal-${{ matrix.configuration }}.zip
|
||||||
|
@ -393,7 +393,7 @@ jobs:
|
||||||
needs: [Ubuntu, macOSUniversal, Windows, WindowsPdb]
|
needs: [Ubuntu, macOSUniversal, Windows, WindowsPdb]
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
path: dist
|
path: dist
|
||||||
- name: Extract source package
|
- name: Extract source package
|
||||||
|
@ -415,7 +415,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp dist/xemu-win-x86_64-release-pdb/xemu-win-x86_64-release.zip dist/xemu-win-x86_64-release-pdb/xemu-win-release.zip
|
cp dist/xemu-win-x86_64-release-pdb/xemu-win-x86_64-release.zip dist/xemu-win-x86_64-release-pdb/xemu-win-release.zip
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ env.XEMU_VERSION }}
|
tag_name: v${{ env.XEMU_VERSION }}
|
||||||
name: v${{ env.XEMU_VERSION }}
|
name: v${{ env.XEMU_VERSION }}
|
||||||
|
@ -439,7 +439,7 @@ jobs:
|
||||||
dist/xemu-ubuntu-aarch64-debug/xemu/xemu-v${{ env.XEMU_VERSION }}-dbg-aarch64.AppImage
|
dist/xemu-ubuntu-aarch64-debug/xemu/xemu-v${{ env.XEMU_VERSION }}-dbg-aarch64.AppImage
|
||||||
dist/xemu-ubuntu-aarch64-release/xemu/xemu-v${{ env.XEMU_VERSION }}-aarch64.AppImage
|
dist/xemu-ubuntu-aarch64-release/xemu/xemu-v${{ env.XEMU_VERSION }}-aarch64.AppImage
|
||||||
- name: Trigger website update
|
- name: Trigger website update
|
||||||
uses: benc-uk/workflow-dispatch@v1.2.2
|
uses: benc-uk/workflow-dispatch@798e70c97009500150087d30d9f11c5444830385 # v1.2.2
|
||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
repo: xemu-project/xemu-website
|
repo: xemu-project/xemu-website
|
||||||
|
@ -457,7 +457,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download source package
|
- name: Download source package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
|
||||||
with:
|
with:
|
||||||
name: src.tar.gz
|
name: src.tar.gz
|
||||||
- name: Extract source package
|
- name: Extract source package
|
||||||
|
@ -476,7 +476,7 @@ jobs:
|
||||||
-- Matt Borgerson <contact@mborgerson.com> $(date -R)" > debian/changelog
|
-- Matt Borgerson <contact@mborgerson.com> $(date -R)" > debian/changelog
|
||||||
popd
|
popd
|
||||||
- name: Deploy source archive to branch
|
- name: Deploy source archive to branch
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./src
|
publish_dir: ./src
|
||||||
|
|
Loading…
Reference in New Issue