This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (91 loc) · 3.3 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: 'build and test'
# rebuild any PRs and main branch changes
on:
pull_request:
push:
branches:
- main
- 'releases/*'
env:
IMAGEMAGICK_VERSION: 7.0.10-25
jobs:
# make sure build/ci work properly
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm install
- run: |
npm run build && npm run format && npm run lint && npm run package
# - run: |
# npm run all
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# use artifact when don't need to re-compile
# - id: download_artifact
# name: Download artifact
# uses: dawidd6/action-download-artifact@v2
# continue-on-error: true
# with:
# # Optional, GitHub token
# github_token: ${{ secrets.GITHUB_TOKEN }}
# # Required, workflow file name or ID
# workflow: test.yml
# # Optional, will use the branch
# # branch: master
# # Optional, will get head commit SHA
# # pr: ${{ github.event.pull_request.number }}
# # Optional, no need to specify if PR is
# # commit: ${{ github.event.pull_request.head.sha }}
# commit: 64db9ad751c66a4ca568cef2e5426e2897d1ab3f
# # Required, uploaded artifact name
# name: ImageMagick-${{ env.IMAGEMAGICK_VERSION }}-x64-precompiled
# # Optional, directory where to extract artifact
# path: ../ImageMagick-${{ env.IMAGEMAGICK_VERSION }}-x64-precompiled
- id: compiled_source
uses: ./
env:
LDFLAGS: '-L/usr/local/lib -R/usr/local/lib'
with:
version: ${{ env.IMAGEMAGICK_VERSION }}
# configure_args: '--with-modules'
configure_args: '--with-modules --disable-installed'
# skip_check: true
skip_cache: true
compile_fallback: true
# artifact_path: ../ImageMagick-${{ env.IMAGEMAGICK_VERSION }}-x64-precompiled
- run: which -a convert
- run: convert --version
- run: identify -list configure
- run: identify -list format
- name: Convert a pdf into png
run: convert -thumbnail 250x250 -background white -alpha remove -flatten ./test/sample.pdf thumbs.png
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.compiled_source.outputs.artifactName }}
path: ${{ steps.compiled_source.outputs.artifactDir }}
if-no-files-found: error
test_artifact:
runs-on: ubuntu-latest
needs: [compile]
steps:
- uses: actions/checkout@v2
- id: download_artifact
name: Download artifact
uses: actions/download-artifact@v2
with:
name: ImageMagick-${{ env.IMAGEMAGICK_VERSION }}-x64-precompiled
path: ../ImageMagick-${{ env.IMAGEMAGICK_VERSION }}-x64-precompiled
- uses: ./
with:
version: ${{ env.IMAGEMAGICK_VERSION }}
artifact_path: ${{ steps.download_artifact.outputs.download-path }}
- run: which -a convert
- run: convert --version
- run: identify -list configure
- run: identify -list format
- name: Convert a pdf into png
run: convert -thumbnail 250x250 -background white -alpha remove -flatten ./test/sample.pdf thumbs.png